"Error: infinite loop"

Q: What's wrong with religion?

void religion(){

string target = "atheist";

string religious ="Do you believe in God?";

target = "Why would I?";

convince(target);
}

void convince(string target){
cout << "Because He's the savior!";
cout << "Only if you believe in him?;
cout << "So believe in him then!"

if (target == "Why would I?")
{  convince(target)  }                 // Rekursivt anrop

}


A: It won't compile.

Kommentarer

Kommentera inlägget här:

Namn:
Kom ihåg mig?

E-postadress: (publiceras ej)

URL/Bloggadress:

Kommentar:

Trackback
RSS 2.0