baron_samedi wrote:Code: Select all
int main(int argc, char *argv[])
{
return 0;
}
The above is a piece of code (which i dont understand lol)
also inserting
and
also removes the errors.
Without the above coding the error messages are as follows:
[Linker error] undefined reference to `WinMain@16'
and
ld returned 1 exit status
I googled the problem, and entered the above code as specified. :S
As I said, theprogram does not seem to do anything.
Well lets start,
your trying to pass unused parameters through the main() function so that wont work. You only use
When you really need to use int argc, and the pointer argv[] that may pass as an Array. You can remove this part till needed.
Its good coding pratice to start like this:
Code: Select all
#include <iostream>
int main(){
return 0;
}
Then just add the varibles and the rest of the code as you start programming, if you have a never-ending loop then you may want to take out return because it would try to return VOID/NULL and exit the program.
Lets start, the
int signifys a interget should be returning the main function
main() . Now the the opening braces and closing indentify the start and beginning of the function.