hi, I started c++ not long ago and I did 2 files in 1 project.
now I know main(); will always be execute first but how do I execute only the submain();?(my other function of the file)?
pls help?
P.S.: how do I use the goto command?
Printable View
hi, I started c++ not long ago and I did 2 files in 1 project.
now I know main(); will always be execute first but how do I execute only the submain();?(my other function of the file)?
pls help?
P.S.: how do I use the goto command?
I don't think it's possible to run a program without Main being called, could be wrong.
You call it from main().Quote:
now I know main(); will always be execute first but how do I execute only the submain();?(my other function of the file)?
With great skill, or not at all ;)Quote:
P.S.: how do I use the goto command?
Hehe great answer laserlight :p
Goto is in C++ and is a "label" selection structure. But, in all honesty, like laserlight said, it should be avoided in all cases excpet in extreme circumstances, ( getting out of a deeply nested for loop structure could be one ).