Tuesday, July 28, 2009

Undefined symbol _main in module co.Asm this is an error message on my cpp program on getting the modepls help

#include%26lt;iostream.h%26gt;


#include%26lt;conio.h%26gt;








void mode(double* nums, unsigned int choice)//Finds mode of the nums entered


{


unsigned int index;


int count=0;


int max =0;


for(index=0; index%26lt;choice; index++)


{


if(nums[index]==nums[index+1])


count++;


else


{


if(count%26gt;max)


max=count;


count=0;


}


}


count=0;


for(index=0; index%26lt;choice; index++)


{


if(nums[index]==nums[index+1])


count++;


else


{


if(count==max)


cout%26lt;%26lt;"Mode(s):\t" %26lt;%26lt;nums[index]%26lt;%26lt;"\n";


count=0;


}


}


}

Undefined symbol _main in module co.Asm this is an error message on my cpp program on getting the modepls help
It's hard to tell because all of the formatting has been lost, but the error you are getting is likely due to there being no "main()" function in your program. Every C++ program must have one main() function to be built as an executable.


No comments:

Post a Comment