Ok so lets say you put Turbo C++ in the C:\ directory and named the folder "TurboCPP"
You changed the those to lines to
IC:\TURBOCPP\INCLUDE (etc...)
???
I''m assuming yes. Lest thing I can think of, go to C:\ and open config.sys (right click, and choose "Open with...", use notepad, or whatever text editor you want) and add this line...
FILES = 20
Mcga 13h mode in C++
Get Turbo C++ 3.0, tis nice.
http://www.maxcode.com/nuke/downloader.php?name=MAXcode&d_op=getit&lid=907
for(loop1=0, loop1(320, loop1++)
{
for(loop2=0, loop2(200, loop2++)
{
PutPixel(loop1, loop2, rand());
}
should be
for(loop1=0; loop2 < 320; loop2++)
{
for(loop2=0; loop1< 200; loop1++)
{
PutPixel(loop1, loop2, rand()%256);
}
void main() {
SetMcga();
Cls(32);
getch();
Cls(90);getc ();Cls(5);
The getc()has the wrong number of arguments, was it getch() you meant or yet another error as I assume the ( was in the for loop instead of being < .
And that rintf is printf in your code. And finally the ' should be ".
Tip:
------------
void PutPixel(int x, int y, unsigned char Col) {
// 0 to 255
memset(vga+x+(y*320),Col,1);}
-----------------
you need not use memset , you could do vga[y*320+x] = col; faster and shorter. or vga[(y<<8)+(y<<6)+x] = col;
The land of Xanth is filled with many hilarious people.
[edited by - Daerax on November 19, 2002 1:50:45 AM]
http://www.maxcode.com/nuke/downloader.php?name=MAXcode&d_op=getit&lid=907
for(loop1=0, loop1(320, loop1++)
{
for(loop2=0, loop2(200, loop2++)
{
PutPixel(loop1, loop2, rand());
}
should be
for(loop1=0; loop2 < 320; loop2++)
{
for(loop2=0; loop1< 200; loop1++)
{
PutPixel(loop1, loop2, rand()%256);
}
void main() {
SetMcga();
Cls(32);
getch();
Cls(90);getc ();Cls(5);
The getc()has the wrong number of arguments, was it getch() you meant or yet another error as I assume the ( was in the for loop instead of being < .
And that rintf is printf in your code. And finally the ' should be ".
Tip:
------------
void PutPixel(int x, int y, unsigned char Col) {
// 0 to 255
memset(vga+x+(y*320),Col,1);}
-----------------
you need not use memset , you could do vga[y*320+x] = col; faster and shorter. or vga[(y<<8)+(y<<6)+x] = col;
The land of Xanth is filled with many hilarious people.
[edited by - Daerax on November 19, 2002 1:50:45 AM]
quote: for(loop1=0, loop1(320, loop1++)
{
for(loop2=0, loop2(200, loop2++)
{
PutPixel(loop1, loop2, rand());
}
should be...
This was some weird thing the forum did, you'll notice at the top it converted the includes to () as well.
quote: The land of Xanth is filled with many hilarious people.
Hehehe, and is shaped like Florida(If I remember correctly) [] Read many of the books then?
[edited by - Xanth on November 19, 2002 2:01:03 AM]
"I thought Genius lived in bottles..." - Patrick Star
Yes.
I also find it funny when he notes that any resemblance to an actual place is totally coincidental and that he lives near place x.
I also find it funny when he notes that any resemblance to an actual place is totally coincidental and that he lives near place x.
quote: Yes.
Me too (Surprise, surprise ), I've read atleast 20 of them (atleast that is the number that comes to mind), I need to pick up the "newest" ones soon, its been a year or two since of I've read one.
quote:
I also find it funny when he notes that any resemblance to an actual place is totally coincidental and that he lives near place x.
LoL! Piers Anthony is funny as hell.
Did you ever play that Xanth game? It was based on "Demons Don't Dream", and it was pretty good, a pity it was the only one though (That I know of).
[edited by - Xanth on November 19, 2002 10:48:00 AM]
"I thought Genius lived in bottles..." - Patrick Star
Im sure the path I put in was right. Its is
IC:\c++\TC\INCLUDE
Thats where I got it installed.
I also tried the thing with the config.sys file. Didnt help.
Daerax, thanx for pointing out those errors in the code. Ill fix them
Tried downloading Turbocpp 3.0 as Daerax said. I tried to download a few times but it keeps quiting a couple seconds into the download. I get the compressed file but it has nothing in it!
Man. Someone up there must really hate me... Perhaps I should try another compiler. Is there any other good freeware c++ compilers out there?
[edited by - sum1 on November 19, 2002 3:57:29 PM]
IC:\c++\TC\INCLUDE
Thats where I got it installed.
I also tried the thing with the config.sys file. Didnt help.
Daerax, thanx for pointing out those errors in the code. Ill fix them
Tried downloading Turbocpp 3.0 as Daerax said. I tried to download a few times but it keeps quiting a couple seconds into the download. I get the compressed file but it has nothing in it!
Man. Someone up there must really hate me... Perhaps I should try another compiler. Is there any other good freeware c++ compilers out there?
[edited by - sum1 on November 19, 2002 3:57:29 PM]
You can't use the "plus sign"(+ ) in your paths
[edited by - Xanth on November 19, 2002 5:54:30 PM]
[edited by - Xanth on November 19, 2002 5:54:30 PM]
"I thought Genius lived in bottles..." - Patrick Star
IT WORKS!!!! It works! it works! it works!!!!! Haha! Yes!!
I changed the folder from C++ to C then changed the path. Thanx for all da help!!!!
I changed the folder from C++ to C then changed the path. Thanx for all da help!!!!
You''re welcome.
"I thought Genius lived in bottles..." - Patrick Star
Wait, I have another problem with the line
unsigned char *vga = (unsigned char *) MK_FP( 0xA000, 0);
The compiler says the error is "Illegal inititalization"
Whats the problem?
I understand most of the line, but I dont know
what the command MK_FP does.
[edited by - sum1 on November 19, 2002 9:17:08 PM]
unsigned char *vga = (unsigned char *) MK_FP( 0xA000, 0);
The compiler says the error is "Illegal inititalization"
Whats the problem?
I understand most of the line, but I dont know
what the command MK_FP does.
[edited by - sum1 on November 19, 2002 9:17:08 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement