system("title variable"); ?

How would I set the title of the window to a variable (string) ?
Since you seem to be using Windows...

1
2
3
4
5
6
7
#include <string>
#include <windows.h>

void setTitle(const std::string& title)
{
    SetConsoleTitle(title.c_str());
}


(try to avoid using system() whenever you can)
Last edited on
Topic archived. No new replies allowed.