What is the proper ansi c example for windows? -
some books claim used ansi c , use turbo c compiler run these example. tried run these on linux found these example windows.
#include<stdio.h> #include<conio.h> /* #include<dos.h> */ int main() { int a; clrscr(); scanf("%d", &a); printf("%d",a); getch(); return 0; } can call above example ansi c? why or why not?
as @milevyo said, functions implemented borland's compilers. on windows can replace clrscr() system("cls") , getch(); _getch(); or, better, getchar().
Comments
Post a Comment