Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question this question on SO.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is mandatory for readability. However, you do not follow standard C++ style for your braces. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is mandatory for readability. However, you do not follow standard C++ style for your braces. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is mandatory for readability. However, you do not follow standard C++ style for your braces. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}
added 22 characters in body
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO: http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practicethis question on SO.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is mandatory for readability. However, you do not follow standard C++ style for your braces: http://en.wikipedia.org/wiki/Indent_style#K.26R_styleyou do not follow standard C++ style for your braces. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO: http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is mandatory for readability. However, you do not follow standard C++ style for your braces: http://en.wikipedia.org/wiki/Indent_style#K.26R_style. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is mandatory for readability. However, you do not follow standard C++ style for your braces. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}
deleted 7 characters in body
Source Link
user34073
user34073

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO: http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is almost mandatory for readability. However, you do not follow standard C++ style for your braces: http://en.wikipedia.org/wiki/Indent_style#K.26R_style. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO: http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is almost mandatory for readability. However, you do not follow standard C++ style for your braces: http://en.wikipedia.org/wiki/Indent_style#K.26R_style. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}

One thing you should do is not use so many (if any) using namespace statements. This does make it a bit easier to write code, but it also can cause many problems with methods being confused with each other. For a detailed discussion of this, check out this question on SO: http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice.

Also, you have many extra returns in your #include statements which make it look like many groups instead of just one.

Finally, your indentation is really good, which is mandatory for readability. However, you do not follow standard C++ style for your braces: http://en.wikipedia.org/wiki/Indent_style#K.26R_style. C++ uses the K&R style, which sets the braces for functions on the next line, but braces inside functions, such as those used in ifs, loops, and switch statements, start on the same line, like this:

void my_function()
{
 while (true) {
 std::cout<<"Something here...\n";
 }
 if (true) {
 std::cout<<"Something else here...\n";
 }
}
Add link
Source Link
user34073
user34073
Loading
Add link
Source Link
user34073
user34073
Loading
Source Link
user34073
user34073
Loading
lang-cpp

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