cout << "1. Which of these Pokemon is a fairy type? \n a. Chansey \n b. Togepi \n c. Skitty \n";
cin >> answer[getans(ans)];
cout << "2. Which of these Naruto characters does NOT have a kekei genkai? \n a. Jiriya \n b. Kimimaru \n c. Sasuke \n";
cin >> answer[getans(ans)];
cout << "3. What does Kenshin say when he's confused? \n a. Uwah? \n b. oro? \n c. mowa? \n";
cin >> answer[getans(ans)];
cout << "4. What's the most annoying radio commercial ever? \n a. Geico \n b. Other insurance company \n c. Kars for kids \n";
cin >> answer[getans(ans)];
cout << "5. How do you defeat Primal Groudon? \n a. ground type moves \n b. water type moves \n c. grass type moves \n";
cin >> answer[getans(ans)];
cout << "You got " << cor << " answers right and " << incor << " answers wrong ";
system("pause");
}
int getans(string ans, char answer[5] = { "b", "a", "b", "c", "a" }) {
int cor = 0, incor = 0;
{
if (ans == answer){
cor++;
}
else
incor++;
return cor, incor;
}
}
Error 1 error LNK2019: unresolved external symbol "int __cdecl getans(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getans@@YAHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main c:\Users\robot arena\documents\visual studio 2013\Projects\Final Project 2\Final Project 2\Source.obj Final Project 2
Error 2 error LNK1120: 1 unresolved externals c:\users\robot arena\documents\visual studio 2013\Projects\Final Project 2\Debug\Final Project 2.exe Final Project 2
3 IntelliSense: expression must have pointer-to-object type c:\Users\robot arena\Documents\Visual Studio 2013\Projects\Final Project 2\Final Project 2\Source.cpp 18 16 Final Project 2
4 IntelliSense: expression must have pointer-to-object type c:\Users\robot arena\Documents\Visual Studio 2013\Projects\Final Project 2\Final Project 2\Source.cpp 21 16 Final Project 2
5 IntelliSense: expression must have pointer-to-object type c:\Users\robot arena\Documents\Visual Studio 2013\Projects\Final Project 2\Final Project 2\Source.cpp 24 16 Final Project 2
6 IntelliSense: expression must have pointer-to-object type c:\Users\robot arena\Documents\Visual Studio 2013\Projects\Final Project 2\Final Project 2\Source.cpp 28 16 Final Project 2
7 IntelliSense: expression must have pointer-to-object type c:\Users\robot arena\Documents\Visual Studio 2013\Projects\Final Project 2\Final Project 2\Source.cpp 32 16 Final Project 2
8 IntelliSense: too many initializer values c:\Users\robot arena\Documents\Visual Studio 2013\Projects\Final Project 2\Final Project 2\Source.cpp 41 48 Final Project 2