hello, i have written this little piece of code which does nothing. i am using VC++ 6.0 and it compiles fine, but when i try to build it it says:
Linking...
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall lol::ask(void)" (?ask@lol@@QAEXXZ)
Debug/game.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
game.exe - 2 error(s), 0 warning(s)
Pls help!
Code:
#include <iostream.h>
#include <stdlib.h>
class lol
{
public:
void ask();
private:
};
void ask()
{
cout <<"Ghiceste: \n";
cout << "he he he he he";
};
int main()
{
lol pc;
//nr1 = rand() % 100;
cout << "******** ala_negru ******** \n";
cout <<"\n Calculatorul se gandeste la un nr pe care tu trebuie sa-l ghicesti.\n";
cout <<"De asemenea iti va spune daca nr tau e mai mare sau mai mic decat al lui. \n";
pc.ask();
return 0;
}