Hello.cpp

Started by
12 comments, last by JMgamer88 23 years, 6 months ago
HOLY CRAP!

Ok now this is getting out of hand sorry!

Also the return statement should be after the system command!
Jeez I need to try write simple programs better I''m looking
like an idiot!

Matthew Fitzgerald (Maketty),
Knightvision Games
Maketty (Matthew FitzGerald) The meaning of Life part 5:Live organ transplants...
Advertisement
Opticon: have you actually tried that out?

I doubt it will make a difference. The program will be terminated when it reaches the ending bracket.

Main is supposed to return 0 to the OS if the program was successfull, and some errorlevel if not. (you can use the errorlevels in batchfiles)

If you don''t return a value, it defaults to an integer anyway and it''ll return garbage.
Check out the coronado enterprises tutorials on my site they''re what I used to learn how to code. Try running it through a dos prompt.



My Homepage
kris vanhoof,
I tried it in my old compiler, and it works. You don''t really have to tell main to return anything (even though it may behind your back)... I admit the program does end, but the window stays open and you can see what the program ended up doing, you just can''t do anymore with it.

This topic is closed to new replies.

Advertisement