General Development

cls in c++ – D-SIPL

D-SIPL

Moderator

Posts: 1345
From: Maesteg, Wales
Registered: 07-21-2001
I'm doing a text based game for my course and wanted to know if there is a way to clear the console in C++. I'm coding this on a Windows XP box.

Thanks.

--D-SIPL

------------------
"One World. One Web. One Program." -Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" -Adolf Hitler

Klumsy

Administrator

Posts: 1061
From: Port Angeles, WA, USA
Registered: 10-25-2001
http://support.microsoft.com/kb/q99261/

..
they don't call me the fastest googler in the west for nothing.

------------------
Karl /GODCENTRIC
Visionary Media
the creative submitted to the divine.
Husband of my amazing wife Aleshia
Klumsy@xtra.co.nz

D-SIPL

Moderator

Posts: 1345
From: Maesteg, Wales
Registered: 07-21-2001
heh thanks for that!

--D-SIPL

------------------
"One World. One Web. One Program." -Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" -Adolf Hitler

vincent

Member

Posts: 129
From: Amersfoort, the Netherlands
Registered: 12-23-2002
Writing ascii code 12 (0xC) to the stdout should also do the trick. It used to atleast....
crazyishone

Member

Posts: 1685
From:
Registered: 08-25-2004
i tried recommending the system function one, but every time i would reply to this thread I got an error.

------------------

globalrant http://globalrant.wastextgames.com
globalrant forums
http://crazyishone.proboards85.com/index.cgi

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
wow... i was wondering the same thing not long ago!! lol klumsy!!
well, i read it, and.... well, i have to say just one thing:
[sarcasm]
hmm, i wonder which one to use..[/sarcasm] (DUH Lol!)
------------------
In the stock market, you must buy high and sell low...Wait! That's not right!
--------------
Yes, I can be intelligent at times!!

[This message has been edited by buddboy (edited January 13, 2006).]

Klumsy

Administrator

Posts: 1061
From: Port Angeles, WA, USA
Registered: 10-25-2001
i think ascii code 12 (0xC) only works if ansi.sys is loaded.

------------------
Karl /GODCENTRIC
Visionary Media
the creative submitted to the divine.
Husband of my amazing wife Aleshia
Klumsy@xtra.co.nz

vincent

Member

Posts: 129
From: Amersfoort, the Netherlands
Registered: 12-23-2002
quote:
Originally posted by klumsy:
i think ascii code 12 (0xC) only works if ansi.sys is loaded.


Imagine how long it has been since I last used to program a console... ah in the old days... when programs where build up from text and not everything was done yet... *gets nostalgic*

crazyishone

Member

Posts: 1685
From:
Registered: 08-25-2004
Klumsy. Your avatar is awesome. Is that you? Either way, it looks like Jesus with an AK. Perhaps Kalashnikov will find his place in heaven. :P


------------------

globalrant http://globalrant.wastextgames.com
globalrant forums
http://crazyishone.proboards85.com/index.cgi

[This message has been edited by crazyishone (edited January 17, 2006).]

[This message has been edited by crazyishone (edited January 17, 2006).]

Klumsy

Administrator

Posts: 1061
From: Port Angeles, WA, USA
Registered: 10-25-2001
yeah that is me, though its a type 81 - a chinese improvement on the ak-47. But i don't think you'd see Jesus will an ak-47

------------------
Karl /GODCENTRIC
Visionary Media
the creative submitted to the divine.
Husband of my amazing wife Aleshia
Klumsy@xtra.co.nz

crazyishone

Member

Posts: 1685
From:
Registered: 08-25-2004
AK's are great guns. (And they many variants and off-shoots tend to be good as well). But you are probably right about Jesus and AK's. :P

------------------

globalrant http://globalrant.wastextgames.com
globalrant forums
http://crazyishone.proboards85.com/index.cgi

Realm Master

Member

Posts: 1971
From: USA
Registered: 05-15-2005
quote:
Originally posted by klumsy:
yeah that is me, though its a type 81 - a chinese improvement on the ak-47. But i don't think you'd see Jesus will an ak-47



why are you holding an automatic assault rifle in the first place? (and i asked the same question on another thread. lol.)

------------------
(yes, i know im stupid)

Blessed are those who suffer for doing what is right.
The kingdom of hevan bleongs to them.-Matthew 5:10

PM ME YOUR DESCRIPTION OF ME! ILL PUT IT HERE!

Here's all the comments!

Klumsy

Administrator

Posts: 1061
From: Port Angeles, WA, USA
Registered: 10-25-2001
military training in china 1996. (------------------
Karl /GODCENTRIC
Visionary Media
the creative submitted to the divine.
Husband of my amazing wife Aleshia
Klumsy@xtra.co.nz

[This message has been edited by klumsy (edited January 18, 2006).]

Klumsy

Administrator

Posts: 1061
From: Port Angeles, WA, USA
Registered: 10-25-2001
and no i'm not a terrorist, even if it looks a bit that way

------------------
Karl /GODCENTRIC
Visionary Media
the creative submitted to the divine.
Husband of my amazing wife Aleshia
Klumsy@xtra.co.nz

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
yah, that made me wonder.... lol!

------------------
In the stock market, you must buy high and sell low...Wait! That's not right!
--------------
Yes, I can be intelligent at times!!