Skip to main content
Commonmark migration
Source Link

Inclusions

##Inclusions YouYou include Windows.h but that would generate an error, since the file is called windows.h. That isn't a real problem on Windows since it uses a case-insensitive filesystem anyway, but that's something to point out.

##enums

enums

Coding Style

##Coding Style YourYour coding style should be consistent and readable to be easy to follow and understand later on. For a consistent coding style, I highly recommend using a tool like indent. ###Variable naming

Variable naming

###Bracing Style

Bracing Style

###Variable declaration placement

Variable declaration placement

##Program design

Program design

###gotoxy()

gotoxy()

###InitiateMatrix()

InitiateMatrix()

Summary

##Summary TheThe code is functional, overall well-designed but unnecessarily long and seemingly outdated.

##Inclusions You include Windows.h but that would generate an error, since the file is called windows.h. That isn't a real problem on Windows since it uses a case-insensitive filesystem anyway, but that's something to point out.

##enums

##Coding Style Your coding style should be consistent and readable to be easy to follow and understand later on. For a consistent coding style, I highly recommend using a tool like indent. ###Variable naming

###Bracing Style

###Variable declaration placement

##Program design

###gotoxy()

###InitiateMatrix()

##Summary The code is functional, overall well-designed but unnecessarily long and seemingly outdated.

Inclusions

You include Windows.h but that would generate an error, since the file is called windows.h. That isn't a real problem on Windows since it uses a case-insensitive filesystem anyway, but that's something to point out.

enums

Coding Style

Your coding style should be consistent and readable to be easy to follow and understand later on. For a consistent coding style, I highly recommend using a tool like indent.

Variable naming

Bracing Style

Variable declaration placement

Program design

gotoxy()

InitiateMatrix()

Summary

The code is functional, overall well-designed but unnecessarily long and seemingly outdated.

added 165 characters in body
Source Link
Amr Ayman
  • 853
  • 1
  • 8
  • 24

##Coding Style Your coding style should be consistent and readable to be easy to follow and understand later on. For a consistent coding style, I highly recommend using a tool like indent. ###Variable naming

Also, since this is a simple function that gets called a lot, it is encouraged to mark it as inline so that the compiler can optimize it in any context it finds fit. This applies to other functions as well.

    for (int i = 0; i < 3; ++i)
        for (int j = 0; j < 3; ++j)
            matrix[i][j] = ' ';

##Coding Style Your coding style should be consistent and readable to be easy to follow and understand later on. ###Variable naming

Also, since this is a simple function that gets called a lot, it is encouraged to mark it as inline so that the compiler can optimize it in any context it finds fit.

    for (int i = 0; i < 3; ++i)
    for (int j = 0; j < 3; ++j)
        matrix[i][j] = ' ';

##Coding Style Your coding style should be consistent and readable to be easy to follow and understand later on. For a consistent coding style, I highly recommend using a tool like indent. ###Variable naming

Also, since this is a simple function that gets called a lot, it is encouraged to mark it as inline so that the compiler can optimize it in any context it finds fit. This applies to other functions as well.

    for (int i = 0; i < 3; ++i)
        for (int j = 0; j < 3; ++j)
            matrix[i][j] = ' ';
added 87 characters in body
Source Link
Amr Ayman
  • 853
  • 1
  • 8
  • 24

If you rely on SCORE to be 1, then explicitly write so, either for readability or if you plan to port the code to other non-posixPOSIX compliant systems/compilers.

Function names are not consistent. Some of them are all lower case, some are lower camel case, some are upper camel case, and some contain underscores.
In See naming conventions

In Windows programming, the convention is to use upper camel case since it is used exclusively all Windows APIs.

YourYou use the K&R style, but your employment of braces seems to be random.
For example:

If you rely on SCORE to be 1, then explicitly write so, either for readability or if you plan to port the code to other non-posix compliant systems/compilers.

Function names are not consistent. Some of them are all lower case, some are lower camel case, some are upper camel case, and some contain underscores.
In Windows programming, the convention is to use upper camel case since it is used exclusively all Windows APIs.

Your use the K&R style, but your employment of braces seems to be random.
For example:

If you rely on SCORE to be 1, then explicitly write so, either for readability or if you plan to port the code to other non-POSIX compliant systems/compilers.

Function names are not consistent. Some of them are all lower case, some are lower camel case, some are upper camel case, and some contain underscores. See naming conventions

In Windows programming, the convention is to use upper camel case since it is used exclusively all Windows APIs.

You use the K&R style, but your employment of braces seems to be random.
For example:

Source Link
Amr Ayman
  • 853
  • 1
  • 8
  • 24
Loading