int main() {
while(1) {
doesLove(you);
}
}

doesLove(String str) {
printf("I love %s!", str);
}

Recommended Answers

All 3 Replies

Add quotation marks ("") around you so the compiler won't expect a variable named you ;)

Also, remember wrapping your code in [code]

[/code] tags. Like this:

[code=C] int main() { while(1) { doesLove(you); } }

doesLove(String str) { printf("I love %s!", str); }

[/code]

Nichito is exactly right... add double quotes("you") like this it pass the string and prints

commented: there is no need to post if you have nothing new to say. -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.