| | |
bouncing ball project
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jul 2006
Posts: 15
Reputation:
Solved Threads: 0
first of all, I wanna say hi to u all as I'm new to daniweb. I'm a freshman in a college so I don't know much of c yet. So please be understanding in case that I will ask some n00b question later on
So this is my problem...first one
I was using this code to get input from player to move the pad right and left
but I ended up getting right movement with anykey pressed
also another problem is getting the ball move as the time passed (I have no idea how to)
So this is my problem...first one
I was using this code to get input from player to move the pad right and left
c Syntax (Toggle Plain Text)
while(i<10) {i++; clrscr(); mov='s'; //supposed to be null, need more knowledge about \0 y=10; gotoxy(x,y);puts(pad);/*supposed to remove the cursor if it's possible. Ended up using puts to make the cursor less noticeable*/ mov==getch(); if(mov='d')//supposed to be right arrow, don't know how to {x=x+1; clrscr(); gotoxy(x,y);puts(pad); } else if(mov='a')//supposed to be left arrow {x=x-1; clrscr(); gotoxy(x,y);puts(pad);
also another problem is getting the ball move as the time passed (I have no idea how to)
•
•
Join Date: Jul 2006
Posts: 15
Reputation:
Solved Threads: 0
I'm using Borland C++ 5.0 in windows xp
I'm not sure which version my compiler is though...
What do you mean about not standard C anymore? Is it about making and using custom library? I've downloaded a source of snake game and I saw some custom *.h files included in it...what I'm curious about is how to produce our own library, I mean what kind of IDE supports making of *.h library? Can you provide me some simple examples of *.h source?
I'm sorry for asking so much question XD
I'm not sure which version my compiler is though...
What do you mean about not standard C anymore? Is it about making and using custom library? I've downloaded a source of snake game and I saw some custom *.h files included in it...what I'm curious about is how to produce our own library, I mean what kind of IDE supports making of *.h library? Can you provide me some simple examples of *.h source?
I'm sorry for asking so much question XD
> What do you mean about not standard C anymore?
Meaning you can no longer pick a random C compiler (say for your Cray supercomputer or your mobile phone), and have your program work on all of them.
> Is it about making and using custom library?
Not necessarily. It could just be using the header files which describe the API of the OS you happen to be using. The Win32 API for example has many useful things which could be used to solve this problem.
Check out the console tutorials here
http://www.adrianxw.dk/SoftwareSite/index.html
Meaning you can no longer pick a random C compiler (say for your Cray supercomputer or your mobile phone), and have your program work on all of them.
> Is it about making and using custom library?
Not necessarily. It could just be using the header files which describe the API of the OS you happen to be using. The Win32 API for example has many useful things which could be used to solve this problem.
Check out the console tutorials here
http://www.adrianxw.dk/SoftwareSite/index.html
•
•
Join Date: Jul 2006
Posts: 15
Reputation:
Solved Threads: 0
LoL
I almost got headache. No doubt it is not standard C anymore. I haven't solved my problem yet, but as it's too advanced for me to solve, let's suppose it's solved. At least I know where to find tutorial if I confuse myself with this kind of problem in the future.
Again, Tons of Thanks to Salem
-Problem's solved-
I almost got headache. No doubt it is not standard C anymore. I haven't solved my problem yet, but as it's too advanced for me to solve, let's suppose it's solved. At least I know where to find tutorial if I confuse myself with this kind of problem in the future.
Again, Tons of Thanks to Salem

-Problem's solved-
![]() |
Similar Threads
- IT project help (Pascal and Delphi)
- Python Graphics Help (Python)
Other Threads in the C Forum
- Previous Thread: recursion help
- Next Thread: what's a GL/glut.h?
| Thread Tools | Search this Thread |
Tag cloud for C
#include * append array arrays asterisks binarysearch calculate changingto char character cm command copyimagefile cprogramme creafecopyofanytypeoffileinc database directory dynamic execv feet fgets file fork forloop framework function functions givemetehcodez grade graphics gtkwinlinux hacking histogram homework include incrementoperators input intmain() iso kernel keyboard km lazy license linked linkedlist linux list lists locate logical_drives looping loopinsideloop. lowest matrix microsoft motherboard mqqueue number oddnumber odf opensource overwrite owf pdf performance pointer posix problem probleminc process program programming radix recursion recv recvblocked research reversing scanf scripting segmentationfault sequential socket socketprograming spoonfeeding standard string student systemcall testing threads turboc unix user variable wab whythiscodecausesegmentationfault windowsapi






