I've just installed codeblocks and I tried to build my first c++ program just to display two words. as a result I've got: fatal error: no such file or directory.
can I get help to fix this problem.
frank
@ASI7296 Although it will work, main() should always return an int. When you do int main(), it will automatically return 0, or you can type return 0; out yourself.
Oh, I must have been working off outdated information. I learned that the implementation may allow the syntax void main(), but it still returns an int somehow.
no i dont think void main returns an int. it is not allowed in c/c++ by the standard but certain compilers (it might be all... i havent tested it) allow you to return nothing. its frowned upon, but it will "work"
I meant like I read somewhere that the C standard allows the void syntax as long as the compilers still have main() return an int. I wish I could find that page.
that doesnt make any sense. c does not allow void at all by the standard. and if you have void main it wont return an int, once again that wouldnt make any sense