0

I was working on a beginner project in C++ on Visual Studio 2015, a calculator and when I find the program, it has the right name, but when I run it, the window title is the file path(C/user/etc.) Is there some way I can change this?

1 Answers1

1

The only bit with SetConsoleTitle that could trip you up is character sets in regards to the display string. Something like this should work:

int main()
{
  SetConsoleTitle( _T( "My Calculator" ) );
  ...
}

_T is a macro to make the strings character set neutral.

Community
  • 1
  • 1
NikolaiDante
  • 18,469
  • 14
  • 77
  • 117