Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
C programing in DOS
Name: Daniel Date: April 1, 2002 at 13:15:39 Pacific
Comment:
I am new to C and i am working on a simple DOS program. Can anybody tell help me with a simple C function call that will return a character if one has been entered from the keyboard or a NULL if one has not, without stopping program execution and waiting for a CR as happens with getch ().
If one is not avaible can somebody help me with some simple assembler code that would do this?
Name: kelly Date: April 2, 2002 at 12:25:57 Pacific
Reply:
getch() is a character input function with unbuffered input without echo, therefore it returns every character as soon as it is presed but does not echo it to the screen.
#include #include
main() { int ch;
while ((ch = getch()) != '\r') putchar(ch); return 0; }
while ((ch = getch()) != '\r')
0
Response Number 2
Name: kelly Date: April 2, 2002 at 12:34:24 Pacific
Reply:
you mentioned getch() waits for a carage return, I remembered that it is non-ANSI compilant so perhaps your compiler has defined it diferntly in the header file. You may want to check your documentation
i will like to ask how to write a c programming code, by write the star use * only use this symbol???
0
Response Number 4
Name: kagingo .umar Date: May 5, 2002 at 05:07:21 Pacific
Reply:
hullo, pliz i would like to meet a friend on the net who is informed about the c language programing so as to inprove ma skills in it. Pliz if there is any one willing to help me out , write to me on the following adress kagingo_u@yahoo.com Pliz kelly if you have read this message do me a favour and any other person willing. thanks alot.
DEAR FRIEND I AM TRYING TO FIND OUT THE FUNCTION THROUGH C IN WHICH IF THE USER DONT ENTER FOR SOME GIVEN STAPULIATED TIME IT SHOULD TAKE THE DEFAULT VALUE eg THE PROGRAM SHOULD WAIT FOR USER RESPONSE FOR SOME STIPULATED TIME.
Summary: hi i am not able to compile my C/C++ program in edit plus. i use turbo c compiler. usually i run my program in DOS mode. but today, i downloaded editplus and set the compilers path according to edit...
Summary: i have compiled a c program in editplus.I got a message " output completed(1 sec consumed). when i tried to execute the program ,same message is shown. now where to see the output ...
Summary: is there any way to execute a dos command from within a C program? I would like to write a simple utility to use at work, to release and renew IP addresses, without having to type the commands in at e...