![]() |
|
#1
|
|||
|
|||
hi eveyone! (& helpppp!!!!)hi eveyone there... im a new guy here... so hi!
can any1 help me? v hav 2 write a game and mine has unknown problem... lots of ppl try 2 help me but is not complete yet but i juz need 2 make the bunny move... i canot clear the screen and canot use a getch()... here's my source cade for it... plz plz plz help.... thx CPP / C++ / C Code:
Last edited by admin : 11-Apr-2007 at 07:09.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#2
|
|||
|
|||
Re: hi eveyone! (& helpppp!!!!)Hi Volpix,
I'll start by being completely honest... I don't know the answer to your problem... I can't work out how to paste this into CodeBlocks (kinda frustrating! I'm a recent addition to the world of C++ you see, so I'll be banking on some of your advice in the near future too. Just a suggestion to help you get some help... at the top of this forum is a notice (sticky) explaining the do's and don'ts for asking for help, and one thing we are requested to avoid is L337 5P3AK... if you catch my drift? I'm not admin here or anyone important, I'd just like to see this bunny jumping too as I know I'd learn something from the finished product. |
|
#3
|
||||
|
||||
Re: hi eveyone! (& helpppp!!!!)For the 2nd problem, change the 'move' variable to be a two-byte array:
CPP / C++ / C Code:
CPP / C++ / C Code:
CPP / C++ / C Code:
For the 1st problem, what system are you using? [I fear a flame-spray coming from dave, davis, and/or waltp] if windows, NOTE THAT THIS IS NOT PORTABLE... a.k.a M$-specific! include stdlib.h, and calling system("cls") might be possible; if you have another system [UNIX, LINUX], I've seen other posts that claim system("clear") for those, but I'm not 100% sure. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#4
|
|||
|
|||
Re: hi eveyone! (& helpppp!!!!)oh... I am so happy!!... and so touched
to TurboPT, thank you very very much for your help. I am able to clear screen now (which make me jumping joyously nonstop). feel motivated to Silent, thanks for your advice too. and to 57 other members who had viewed my post, |
|
#5
|
||||
|
||||
Re: hi eveyone! (& helpppp!!!!)How old is your Borland compiler?
Here are some posts with more info. about clrscr(), and the header file conio.h: (concerning their non-standardness) (by waltp) http://www.gidforums.com/showpost.ph...77&postcount=4 (by davekw7x) http://www.gidforums.com/showpost.ph...82&postcount=5 A couple of other things that I didn't mention, in the previous post, that you might want to consider: 1. Since you have headers without the .h extension, I didn't see this statement (typically found between the header files and main): CPP / C++ / C Code:
2. You are working outside the bounds of the array with some of your loops. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#6
|
||||
|
||||
Re: hi eveyone! (& helpppp!!!!)Quote:
And volpix, since it's obvious you haven't done this yet, please read the Guidelines. You must have missed them on the main C++ forum page. __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#7
|
||||
|
||||
Re: hi eveyone! (& helpppp!!!!)Quote:
Quote:
I don't think you can do this. You have to let C++ know when you are done entering text. Otherwise how would the program know when to stop gathering data? __________________
"To argue with a person who has renounced the use of reason is like administering medicine to the dead." -Thomas Paine www.sullivan-county.com/deism.htm |
|
#8
|
|||
|
|||
Re: hi eveyone! (& helpppp!!!!)hi again, I am kind of busy doing my assignment and thaknks for those tips. however, i can use the clrscr() and getch() in other function(like interface and menu) so I am wondering why is it only malfunction inside the putcontrol function?
and when I face a few problems when I wanted to use setcolor function because in some function(displaybackground) I do not think I can use textcolor and cprintf. so when I try with the setcolor with the header <windows>, CPP / C++ / C Code:
I got 5 errors such as (20,15): too many types in declaration, (20,16): { expected, (47,12): expression syntax, (54,15): too many types in declaration, and (54,16): { expected. all this do not appear until I put in the header file #include <windows>. here is the game so far, still working on the time limit function as I do not know how to countdown. and I cut some irrelevant part like what the guideline say.... CPP / C++ / C Code:
is it all right to post such long codes here? if not, please tell me.... |
|
#9
|
|||
|
|||
Re: hi eveyone! (& helpppp!!!!)Quote:
last night I go through the code and I hate myself for not realizing source of the problem earlier. I can use the <windows.h> header file now as the real cause is the name of the function: interface. it is actually a keyword,set aside for special purpose and cannot be use. Problem solve!anyway, I solve the problem and I am sorry if I trouble anyone. The assignment will be summit on Monday. |
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Which text has the most words, the least words, etc. | GQgirl | C Programming Language | 5 | 27-Nov-2006 01:07 |
| reading from csv file, plzzzzzzzz helpppp | tomyy | C Programming Language | 3 | 10-Mar-2006 10:44 |
| Hello to eveyone | Dailyhosting | New Member Introductions | 2 | 26-Nov-2004 01:27 |
| hello eveyone | hangmansjoke | Open Discussion Forum | 7 | 25-Sep-2004 03:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The