Avinash Sonawane PICT Pune Facebook <http://www.facebook.com/avinash.sonawane1990> Twitter <http://www.twitter.com/SonawaneAvinash>
On Thu, Jul 28, 2011 at 1:12 PM, Avinash Sonawane < [email protected]> wrote: > > Avinash Sonawane > PICT Pune > Facebook <http://www.facebook.com/avinash.sonawane1990> > Twitter <http://www.twitter.com/SonawaneAvinash> > > > > On Thu, Jul 28, 2011 at 12:44 PM, Tavish Naruka <[email protected]>wrote: > >> >> 2) Is there any similar kind of replacement for getch() too ? >>> 3) Why conio.h doesn't work in GCC ? >>> >> >> if you are used to using getch() at the end of your programs, to create a >> pause, then its not needed. For other uses you can use getchar(). These are >> not a part of the standard c library libc, so you can't use conio.h. >> > > All right. Actually I use getch() just to see the output. By the way when I > used getchar() instead of getch(), program got executed but didn't show any > output on the terminal. which simply means it didn't stop. > > But interestingly when I run the same code on CodeBlock IDE it showed me > the output. Why is it so ? > > Program : > > # include <stdio.h> > # include <stdlib.h> > > void main() > { > system("clear"); > printf("First program using GCC"); > getchar(); > } > > terminal: > > avinash@titanic:~/Documents/C$ gcc first.c > avinash@titanic:~/Documents/C$ > I missed ./a.out Thank you all. Problem solved. > > >> -- >> Tavish Naruka >> >> >> -- >> Mailing list guidelines and other related articles: >> http://lug-iitd.org/Footer >> > > -- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
