|
#include <iostream>
using namespace std;
int k = 1;
int main ()
{
int i = 4;
int fun (int);
Ranch
fun (i);
cout << "(1)" << i << ',' << k << endl;
return 0;
}
void fun (int m)
{
m + = k;
k + = m;
{
char k = 'B';
cout << "(2)" << char (k-'A ') << endl;
}
cout << "(3)" << m << ',' << k << endl;
}
This program compiles,
Why does it appear when running:
-------------------- Configuration: Cpp1-Win32 Debug --------------------
Linking ...
Cpp1.obj: error LNK2001: unresolved external symbol "int __cdecl fun (int)" (? Fun @@ YAHH @ Z)
Debug / Cpp1.exe: fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Cpp1.exe-1 error (s), 0 warning (s)
what happened? |
|