Mail Archives: djgpp/1998/08/27/21:00:07
Hello again, everyone!
I have some new beginner's questions about DJGPP.
Can someone explain me the basics of string operations? Preferably the
differences of string handling of C vs Borland Pascal.
How can I do the following thing in my Allegro-based game: I need to have
"chat mode", i.e. when you press Enter for the first time, cursor appears
and from now till the second Enter press all alpha-numeric-keys entered will
be captured and added to the string. When user pressed Enter second time,
the entered string will be sent (that's my problems how it will be sent, who
will get it, etc).
So, there a list of problems:
1) How can I add characters in "chat-mode" to my string? I've tried strcat
but haven't figured out how it works :(
2) How can I capture only alphanumeric keys and "hide" that user pressed it
from the rest of program (i.e. when user presses "a" in chat-mode, "a"
should be added to chat-string, but not "A"ttack order executed).
3) Can I have an array of strings that I can show on screen as "last
messages buffer"? How to add and scroll this array?
Sorry for so basic questions, but I don't have any good books on C here, so
I'm forced to ask it in newsgroup... As before, send me a copy of your reply
directy on myakshin AT glasnet DOT ru, because I'm not sure if I'll get the answer
in newsgroup...
Bye!
- Raw text -