Skip to content

Instantly share code, notes, and snippets.

@chrisdel101
Created March 1, 2020 23:08
Show Gist options
  • Save chrisdel101/6e1246041f41898d279481af09f6a4bc to your computer and use it in GitHub Desktop.
Save chrisdel101/6e1246041f41898d279481af09f6a4bc to your computer and use it in GitHub Desktop.
buffer init
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];
};
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