Hi,
I have a rand function that I defined in the rand.cpp file which I have
included in my program. I don't have any problem with complie, however, it
always comes back with link errors:
ompiling...
simulation1.cpp
RAND.CPP
Linking...
defined in simulation1.obj
already defined in simulation1.obj
already defined in simulation1.obj
Debug/simulation1.exe : fatal error LNK1169: one or more multiply defined
symbols found
Error executing link.exe.
Here is part of my program:
#include <iostream.h>
#include <math.h>
#include "c:\rand.cpp"
int main()
{
int i = 1;
double number1;
number1 = rand(i);
cout << number1;
return 0;
Quote:
}
Can someone please explain to me what did I do wrong? Thank you.