0
Why gaming codes look different from lessons here but seem more logical?
int main () void printsomething() {cout <<printsomething;} rather than: void print something () int main () {cout <<printsomething; return 0;} same result less code, since void cancels any return value.
1 Respuesta
0
wrong code. In main function you can dont write return 0. compiler do it for you. If you look for difference with this:
void printsomethink(){
string printmessage;
cout<<printmessage;}
int main(){
cout<<printsomethink();}
and this:
int main(){
string printmessage;
cout<< printmessage;}
game coders use the first one. because in the function printsomethink you have string message for this function. where function is done, memory is clear. on main, your memory will remember the variables to end of program.
sorry for my english