Hi everyone. came across this problem from loop chapter of jumping into C++. The problem is:
"Write a user login program that allows user to enter login info only certain number times so that user wouldn't write a password cracker"
everything seems right . but everytime I run it, in code::blocks(IDE for windows), in the build message window, I get the message. " undefined reference to 'WinMain@16' ".
i tried writing same code with all while, for- while, and do-while loop. but everytime the same message. could anyone tell what the problem is either with my IDE configuration or code. Also does anyone have more succint way of writing the same? (remember i am into c++ only for only 3 days. so i only know the concept of if and loops)
The problem is, I think, with your IDE configuration (though you will want to rename int man() to int main()); your program apears to be set to build as a Windows application, which starts from WinMain() rather than main(). I suggest you make a new Empty Project and copy your code into there, then try building.
my bad in typing error. changing "int man()" to "int main()" solved the problem. everytime with new loop only changed the body and thus missed "int man()"
thank you for solution.
by the way could you plz have a look at this new problem?