Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
using namespace std;

I don't do much C++, but one thing I've learned from the many reviews I've upvoted on this site, I'm 100% positive, it isn't a good idea to import std in the global namespace; instead, refer to std::cout, std::string and std::istringstream.

See this Stack Overflow answer this Stack Overflow answer for more details about why it's best to avoid potential name clashes by not importing that namespace.

Also return 0 at the end of the main() procedure is redundant, the compiler should take care of it.

using namespace std;

I don't do much C++, but one thing I've learned from the many reviews I've upvoted on this site, I'm 100% positive, it isn't a good idea to import std in the global namespace; instead, refer to std::cout, std::string and std::istringstream.

See this Stack Overflow answer for more details about why it's best to avoid potential name clashes by not importing that namespace.

Also return 0 at the end of the main() procedure is redundant, the compiler should take care of it.

using namespace std;

I don't do much C++, but one thing I've learned from the many reviews I've upvoted on this site, I'm 100% positive, it isn't a good idea to import std in the global namespace; instead, refer to std::cout, std::string and std::istringstream.

See this Stack Overflow answer for more details about why it's best to avoid potential name clashes by not importing that namespace.

Also return 0 at the end of the main() procedure is redundant, the compiler should take care of it.

Source Link
Mathieu Guindon
  • 75.5k
  • 18
  • 194
  • 467
using namespace std;

I don't do much C++, but one thing I've learned from the many reviews I've upvoted on this site, I'm 100% positive, it isn't a good idea to import std in the global namespace; instead, refer to std::cout, std::string and std::istringstream.

See this Stack Overflow answer for more details about why it's best to avoid potential name clashes by not importing that namespace.

Also return 0 at the end of the main() procedure is redundant, the compiler should take care of it.

lang-cpp

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