Advertisement

C++ clear screen

Started by March 08, 2001 03:50 PM
13 comments, last by MARS_999 23 years, 11 months ago
OpenGL is good . Glut is kind of annoying in Windows though... You can use the SDL if you want fully cross platform code without having to change any of yours. I just confine all of my Windows Specific code to a couple files, so that I can change them, but nothing else when I port my engine.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
Ok I DL SDL. I got it to compile ok but when I run it, it does nothing. I mean no window comes up or anything. So what I am wondering is where can I find a very simple very very simple code to put in their to see how is works. I only have coded in dos and no gpx. I am not familar with this neither
int main( int argc, char* argv[])
for a main function. What are the arguments main accepts? argc and pointer argv[] array? I am used to void main(void) or int main(). I hate it when I can''t just sit down and watch someone code this stuff or show me what I am doing wrong. Dam it, visual learning generation I come from sucks!!!!


Windows SUCKS! Deal with it!
if(windows crashes)
{
run linux
}
else
{
yea right!!
}
Advertisement
Argc is the number of arguments that argv is holding. Argv[0] is the name and path of the program. Argv[1] is the first parameter, Argv[2] is the second, et cetera. For example, if I typed this into the DOS prompt:

C:\Some Folder\ABC\>abc -1 -2

The program abc would have:
Argc = 3
Argv[0] = "C:\Some Folder\ABC\abc.exe"
Argv[1] = "-1"
Argv[2] = "-2"

Get it?

They have a lot of examples on their site, but I haven't personally used the SDL, I based my engine off of Nehe's Tutorial 1 code (I rearranged it, put it in multiple files) then went off in my own direction (made it into my own engine, only using his first tutorial, but more my own code now).

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP's Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/

Edited by - Null and Void on March 8, 2001 9:51:14 PM
Thanks Null and Void. Your help is much welcomed. I just need to program a text based game and go from their. I just can''t get ahold of all the windows programming ideas. I can get around in DOS but not windows code at all. I can use struct''s but not yet into classes. I don''t know when my college level classes will get more advanced but hope to learn more about OOP. I doubt it but do you have any code or know where I can find code on DOS based text games for me to have a guide to go by? That would be great. I guess I will put the whole windows and graphics coding on the back burner till I get more experience. Thanks again. Tom

Windows SUCKS! Deal with it!
if(windows crashes)
{
run linux
}
else
{
yea right!!
}
I wish I did. I never completed any of my DOS based text games (I was too obsessed with making a graphical game, and forced myself in to learning the Win32 API and DirectX 7, then finally OpenGL). I''m sure there is code out there though.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/

This topic is closed to new replies.

Advertisement