我是C编程新手,刚刚遇到此程序并出现问题。它说它在我表示的线上有错误。任何人都可以帮忙吗?printf在编译时显示错误
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
float a;
printf("Hello world!\n");
scanf("%d",&a)
printf("you entered: %f",a);//here is the error
getch()
}
我正在使用CodeBlocks。
只有一个评论:'conio.h'不是标准C库的一部分。 'getch()'也不是:http://en.wikipedia.org/wiki/Conio.h你可能想考虑不使用这些EVER :) – ArjunShankar 2012-04-03 15:11:04
下次,请发布你得到的实际错误信息。 – 2012-04-03 15:29:05