please .. How Can I Add a Title


How Can I Add a Title To The Program that we can see it on the Top bar ?


I think we use system ("??????") or some thing like that ...

Also add colors ..


Assuming you are running under windows: http://msdn.microsoft.com/en-us/library/ms682087.aspx
no no .. there is a way in c++ by system (" "); << i dunno what
Never use system() on Windows. Use win32 api.
Any particular reason why you'd insist on system() when you have the win32 API to handle it?
closed account (z05DSL3A)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <windows.h>
#include <tchar.h>


int main(int argc, _TCHAR* argv[])
{
    
    system("title The bad way to change the console title");

    SetConsoleTitle(_T("The better way to change the console title") );
    
    return 0;
}
Assuming you are running under windows
cuz I dont know any thing about it ...
I gave you a link to the win32 API where it says which functions to call to set the title, color, etc. Grey Wolf just gave you a turn-key solution to how to use the API.

The idea here is that if you spend 5 minutes looking at the supplied link, you might find that the is A LOT you can do using the win32 API (apart from changing window titles) - a lot of which can not be done using system() - and it is all quite easy.

I really suggest you read it...
Topic archived. No new replies allowed.