Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
  • Try not to use using namespace std.

  • iostream is a system header, so it should be surrounded by angle brackets as such:

     #include <iostream>
    

    Quotes are only used for user headers.

  • system("PAUSE") isn't very good to use for a number of reasons, mostly relating to performance and portability.

    Here's one alternative that avoids these problems:

     std::cin.get();
    

    It'll ask for a character input (with Enter) instead of any key by itself, however.

  • Try not to use using namespace std.

  • iostream is a system header, so it should be surrounded by angle brackets as such:

     #include <iostream>
    

    Quotes are only used for user headers.

  • system("PAUSE") isn't very good to use for a number of reasons, mostly relating to performance and portability.

    Here's one alternative that avoids these problems:

     std::cin.get();
    

    It'll ask for a character input (with Enter) instead of any key by itself, however.

edited body
Source Link
vnp
  • 58.6k
  • 4
  • 55
  • 144
  • Try not to use using namespace std.

  • iostream is a system header, so it should be surrounded by ankleangle brackets as such:

     #include <iostream>
    

    Quotes are only used for user headers.

  • system("PAUSE") isn't very good to use for a number of reasons, mostly relating to performance and portability.

    Here's one alternative that avoids these problems:

     std::cin.get();
    

    It'll ask for a character input (with Enter) instead of any key by itself, however.

  • Try not to use using namespace std.

  • iostream is a system header, so it should be surrounded by ankle brackets as such:

     #include <iostream>
    

    Quotes are only used for user headers.

  • system("PAUSE") isn't very good to use for a number of reasons, mostly relating to performance and portability.

    Here's one alternative that avoids these problems:

     std::cin.get();
    

    It'll ask for a character input (with Enter) instead of any key by itself, however.

  • Try not to use using namespace std.

  • iostream is a system header, so it should be surrounded by angle brackets as such:

     #include <iostream>
    

    Quotes are only used for user headers.

  • system("PAUSE") isn't very good to use for a number of reasons, mostly relating to performance and portability.

    Here's one alternative that avoids these problems:

     std::cin.get();
    

    It'll ask for a character input (with Enter) instead of any key by itself, however.

Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238
  • Try not to use using namespace std.

  • iostream is a system header, so it should be surrounded by ankle brackets as such:

     #include <iostream>
    

    Quotes are only used for user headers.

  • system("PAUSE") isn't very good to use for a number of reasons, mostly relating to performance and portability.

    Here's one alternative that avoids these problems:

     std::cin.get();
    

    It'll ask for a character input (with Enter) instead of any key by itself, however.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /