hi guys,
what does this error mean?
i'm getting it when trying to run my coin toss program.Code:Linking... hw1017_6.obj : error LNK2001: unresolved external symbol "int __cdecl flipacoin(int,int)" (?flipacoin@@YAHHH@Z) Debug/hw 1017_6.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.
Code://Michele DAddio CS210 //10_17_02 //HW #6 : RANDOM #include<iostream> #include<cstdlib> #include<ctime> #include<iomanip> using namespace std; //function prototype int flipacoin (int, int); void main() { int h = 0; int t = 0; int freqheads = 0; int freqtails = 0; for (int flip = 1; flip <= 10; flip++){ cout << flipacoin(h,t) << endl; if(1) cout << "H" << endl; else if(0) cout << "T" << endl; freqheads++; freqtails++; } } //function definition int flipacoin() { return (rand () % 2); }
thanks Miche



LinkBack URL
About LinkBacks


