#Details review
Details review
#Details review
Details review
- 87.9k
- 14
- 104
- 325
class Grid
{
public:
class cell;
class const_cell;
Grid(std::size_t width, std::size_t height);
char operator()(int x, int y) const;
void set(int x, int y, char value);
};
class Grid
{
public:
class cell;
class const_cell;
Grid(std::size_t width, std::size_t height);
char operator()(int x, int y) const;
void set(int x, int y, char value);
};
class Grid
{
public:
Grid(std::size_t width, std::size_t height);
char operator()(int x, int y) const;
void set(int x, int y, char value);
};
- 87.9k
- 14
- 104
- 325
Always check the return value of system()
. Here, you're executing a program that doesn't exist on my system, so it just gives a whole lot of error output. If this is intended to clear the screen, consider using a Curses implementation (but be aware that it's still not going to be effective when output is going to a file, a printer or an Emacs buffer). As it's the only part of the code that's not portable C++, it's well worth considering another approach here.
Always check the return value of system()
. Here, you're executing a program that doesn't exist on my system, so it just gives a whole lot of error output. If this is intended to clear the screen, consider using a Curses implementation (but be aware that it's still not going to be effective when output is going to a file, a printer or an Emacs buffer).
Always check the return value of system()
. Here, you're executing a program that doesn't exist on my system, so it just gives a whole lot of error output. If this is intended to clear the screen, consider using a Curses implementation (but be aware that it's still not going to be effective when output is going to a file, a printer or an Emacs buffer). As it's the only part of the code that's not portable C++, it's well worth considering another approach here.