Menu

2 questions

2008-01-31
2012-09-26
  • Nobody/Anonymous

    1. can i change what appears in the the standard window at the "c++ console aplication"?
      i mean that instead of :

    include <cstdlib>

    include <iostream>

    using namespace std;

    int main(int argc, char *argv[])
    {
    system("PAUSE");
    return EXIT_SUCCESS;
    }

    appears something else.

    2.why can't i use void main?
    sry if this subject had beed discussed.
    thnx and i am sorry for my poor english.

     
    • cpns

      cpns - 2008-01-31

      1) Yes. Modify the relevant text file in the c:\dev-cpp\templates folder.

      2) In C++ void main() is invalid; in C it is just non-portable and generally a bad idea. In C++ you do not actually need an explicit return statement in main() - that is true only of main() and no other function. Moreover some pre-ISO standardisation compilers don't know that (MSVC++ 6 for example) and will insist that you have an explicit return and let you use void main(). Newer versions of MSCV++ are ISO compilant in this respect however.

      Clifford

       
    • Nobody/Anonymous

      Void main is wrong because everthing is done as int main.

      Even my dog uses int main () {

      Dont tell anyone you use void main.

      Kurgusov

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.