Jun 30, 2009 at 4:32am
How to you rename the console window from "C:\Documents and Settings\*name*\Desktop\etc.." to say.. "Adventure Game" or something?
Jun 30, 2009 at 5:14am
You can make it with system() command, but usage of system() is not suggested . So don't use it if you don't need to.
|
system( "Title Adventure Game" );
|
I don't know any other way to do it. If there's any , you should use that way.
Last edited on Jun 30, 2009 at 5:14am
Jun 30, 2009 at 6:17am
Psault, I get the error,
[code=cpp]1>c:\documents and settings\brad\desktop\coding files\cpp projects\test_01\test_01\main.cpp(6) : error C2440: 'initializing' : cannot convert from 'const char [15]' to 'int'[/code]
with that code.
Last edited on Jun 30, 2009 at 6:27am
Jun 30, 2009 at 11:20am
Cheesy, which compiler are you using??? I tried, Psaults code works with Dev(not only with dev).
Jun 30, 2009 at 12:32pm
He keeps compiling with UNICODE, so he needs to use some Windows macros around his string literals...
1 2 3 4 5 6 7
|
#include <windows.h>
int main()
{
SetConsoleTitle( TEXT( "Adventure Game" ) );
...
}
|
Last edited on Jun 30, 2009 at 12:33pm
Jun 30, 2009 at 4:57pm
Well I'm using VC++ 2008 Express, should I be using something else...? (Also something wrong with unicode?)
PS: Thanks again Duoas! :)
Last edited on Jun 30, 2009 at 5:36pm
Jun 30, 2009 at 5:56pm
I think,VC++ is fine. About unicode, Duoas knows better.