I want to be able to set the console size to be exacly the same no matter what device it runs on, so far I have used
static const int nScreenWidth = 80;
static const int nScreenHeight = 30;
int main()
{
system("MODE CON COLS=80 LINES=30");
}
But since I`m storing the width and height in variables it needs to be changed manually and that is not cool. I have tried
system("MODE CON COLS=" + std::to_string(nScreenWidth).c_str() + " LINES=30");
but I get expression must have integral or unscoped enum type.
All of the functions from
#include <windows.h>
set the console size in pixels but I need it to be in characters.