Created
March 1, 2020 23:08
-
-
Save chrisdel101/6e1246041f41898d279481af09f6a4bc to your computer and use it in GitHub Desktop.
buffer init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Buffer::Buffer() | |
{ | |
BUFFER_ROW_COUNT = 20; | |
BUFFER_COLUMN_COUNT = 60; | |
offSetColumn = 0; | |
offSetRow = 0; | |
//how to I set the values of the - this does not work | |
buffer[BUFFER_ROW_COUNT][BUFFER_COlUMN_COUNT]; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Buffer | |
{ | |
private: | |
// offset rows scrolled by player | |
unsigned int offSetRow; | |
// offset cols scrolled by player | |
unsigned int offSetColumn; | |
// physical storage for the buffer | |
int BUFFER_ROW_COUNT; | |
int BUFFER_COLUMN_COUNT; | |
// cannot use the above consts here - compiler error | |
char buffer[0][0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment