First of all,
int main()
, not
void main()
.
Second of all, the function's not written correctly...
1 2 3 4 5 6 7
|
void one (string a, string b, string c)
{
if (a == "two" || b == "two" || c == "two") // No "return"
cout << "You got it! It was two!\n";
else
cout << "Try again!\n";
}
|
Third of all, you have a function named "one", and also a string variable named "one".
You can't do that...(in other words, rename the function).
And fourth of all, you're not calling it correctly. (on line 35)
You should be calling it like
theNewNameOfMyFunctionHere(one, two, three); // No cout
Of course, that's not exactly how I would've written this program, but this will at least fix your error(s). (and give you the correct output)
EDIT: Wow, you beat me by just a few seconds...