is there a way that i can program a "buzzer" into my game so that if a key is pressed it will take them instantly to the next part. If you don't understand that ill try to explain it more but thanks in advanced for helping.
is there a way that i can program a "buzzer" into my game so that if a key is pressed it will take them instantly to the next part. If you don't understand that ill try to explain it more but thanks in advanced for helping.
putchar('\a')
?
If I understand your question you want for something to happen if the user presses a key?
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
yes that if a user presses a key but doesnt have to press enter. also that different keys will do different things
Where is the application supposed to run on? Windows, Mac, console, Linux?
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
console
if you wan't the program to be interrupted when the user presses a key, you'll have to use a library.
Well then... too many options:
You can use PDCurses which is an excellent portable curses system. If you need help with installing and using it, let me know and I can help. Personally this is the better option. Both if you want to extend your console application to have colors and have more control over printing on the screen, and because it is portable across different systems.
Or you can use the non portable CONIO library. I can't help you with this one. Others might. Only works in windows consoles. Has the same (less some) capabilities of curses above.
Or you can use the C++ iostreams that are a language facility and don't need you to download and install anything. Much easier but limits the scope of what you can do.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
I'll download those when i get access to internet on my computer again but thanks for the help.
For the conio option, have a look at this FAQ: http://faq.cprogramming.com/cgi-bin/...&id=1043284392
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
The iostream option is not possible. It depends on the system for console handling, which means it will wait for enter to be pressed.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Corned Bee and Mario are right iostream wont work so you will have to download a library
Not necessarily download. The Win32 API can do it, and it comes with most compilers. (Not VC++ Express.)
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I believe the Win32 API does come with VC++ Express, it is just part of a separate download. Its MFC that's not available.
vc++ express doesn't come with win32 unless you download it seperatly I would know i was too cheap too aford anything else