Quote
multiple markers at this line:
-multiple definition of 'main'
-multiple definition of 'main'
So, i was getting this issue when i was working on a C project. My professor gave us a project to tinker with.
Origionally it was set up as follows:
#define BITS = 12 #define HASHING_SHIFT (BITS-8) #define MAX_VALUE (1<<BITS)-1 #define MAX_CODE MAX_VALUE -1 #if BITS ==14 #define TABLESIZE 18041 #endif
and i changed it to the following:
//set this up globally
unsigned int BITS,HASHING_SHIFT,MAX_VALUE,MAX_CODE,TABLE_SIZE;
int main (int argc, char *argv[]){ //<--this bracket as well as all other functions give error.
BITS = 12;
HASHING_SHIFT = (BITS-8);
MAX_VALUE = (1<<BITS)-1;
MAX_CODE = MAX_VALUE -1;
but i keep getting the error. I was unsure why, as all of the beginning brackets are throwing this error at me.
Does anyone know how to solve this issue? Ill add more code if nessicary, but that is pretty much the only thing i had changed.

New Topic/Question
Reply



MultiQuote





|