How to make it in C? (me again:P)

Write here if you have problems with your C source code

Moderator: Board moderators

Post Reply
Learning poster
Posts: 51
Joined: Thu Sep 26, 2002 7:43 pm
Location: Easton, PA, USA

Post by zsepi »

most of the time I use this site for quick reference:
to answer your specific question, here is the documentation on printf:
though you might wanna have a look at some C tutorial...
Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
Experienced poster
Posts: 146
Joined: Mon Feb 04, 2002 2:00 am
Location: VCORE.

Post by hank »

You can try this code... :P
#include "stdio.h"
#include "conio.h"
void main()

int k ;
while( ( k=getche() )!='\n' ){
Dominik Michniewski
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland

Post by Dominik Michniewski »

you also may use this:

#include <stdio.h>

while((k = getchar()) != '\n')
/* something to do */
using "conio.h" under unix is not allowed ...

Best regards
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Russell John
New poster
Posts: 40
Joined: Mon Jul 21, 2003 9:21 am
Location: Planet Earth

Post by Russell John »

Dominik Michniewski wrote: using "conio.h" under unix is not allowed ...
Thanks for the info... didn't knew that!

What to use in UNIX then? :o
1024 Programmer's Lane,
Algorithm City, United States of C++,
Planet Earth.
Krzysztof Duleba
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland

Post by Krzysztof Duleba »

Dominik already wrote.

conio is a Borland extension, not present in the standard, not supported by other compilers, definitely not present in gcc.
Post Reply

Return to “C”