| View previous topic :: View next topic |
| Author |
Message |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Sat Jul 05, 2008 9:55 pm Post subject: |
|
|
Some sites say it's fine, while others say there are limits to using it on certain OS's and modes of the how the program is loaded. I would just stick to using API if possible. (Any reason you are trying to avoid API?)
_________________
- Retired. |
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Sun Jul 06, 2008 4:07 am Post subject: |
|
|
| Wiccaan wrote: | | Some sites say it's fine, while others say there are limits to using it on certain OS's and modes of the how the program is loaded. I would just stick to using API if possible. (Any reason you are trying to avoid API?) |
I don't like WINE =/
|
|
| Back to top |
|
 |
Heartless I post too much
Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Sun Jul 06, 2008 6:16 am Post subject: |
|
|
| Wiccaan wrote: | Clearing the console with API:
| Code: | CONSOLE_SCREEN_BUFFER_INFO pConsoleBufferInfo;
COORD cCoords = {0};
GetConsoleScreenBufferInfo( GetStdHandle(STD_OUTPUT_HANDLE), &pConsoleBufferInfo );
FillConsoleOutputCharacter( GetStdHandle(STD_OUTPUT_HANDLE), 32, pConsoleBufferInfo.dwSize.X*pConsoleBufferInfo.dwSize.Y, cCoords, NULL );
SetConsoleCursorPosition( GetStdHandle(STD_OUTPUT_HANDLE), cCoords ); |
|
| Code: | | system("cls") //or "clear" I forgot which. |
_________________
What dosen't kill you, usually does the second time. |
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Sun Jul 06, 2008 7:07 am Post subject: |
|
|
| HornyAZNBoy wrote: | | Code: | | system("cls") //or "clear" I forgot which. |
| NOOOOooooooo! Hint: "sh: cls: command not found" or "'clear' is not recognized as an internal or external command, operable program or batch file.". Yes, one of the reasons is portability, but you should guess what's an another one by help of this hint. Another hint: calls external stuff... It's a resource hog. W/e :P
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Mon Jul 07, 2008 5:59 pm Post subject: |
|
|
| HornyAZNBoy wrote: | | Wiccaan wrote: | Clearing the console with API:
| Code: | CONSOLE_SCREEN_BUFFER_INFO pConsoleBufferInfo;
COORD cCoords = {0};
GetConsoleScreenBufferInfo( GetStdHandle(STD_OUTPUT_HANDLE), &pConsoleBufferInfo );
FillConsoleOutputCharacter( GetStdHandle(STD_OUTPUT_HANDLE), 32, pConsoleBufferInfo.dwSize.X*pConsoleBufferInfo.dwSize.Y, cCoords, NULL );
SetConsoleCursorPosition( GetStdHandle(STD_OUTPUT_HANDLE), cCoords ); |
|
| Code: | | system("cls") //or "clear" I forgot which. |
|
| Code: | void clearConsole(void)
{
#ifdef WINDOWS
std::system ( "CLS" );
#else
std::system ( "clear" );
#endif
} |
Haha, diabolical.
|
|
| Back to top |
|
 |
|