C语言的问题谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/11 23:02:22
// Note:Your choice is C++ IDE
#include "iostream.h"
void main()
{
printf("hello world/n");
}
为什么我运行后不显示错误啊 是什么UNDECLARED IDENTIFIER
我学C用什么编辑器好啊 WINDOWS下的谢谢啦

你包含的头文件是iostream.h~~~
下面2个程序是相同结果(比较包含的头文件,明白了吧)
//NUM 1
#include <iostream.h>
void main()
{
cout<<"hello world<<endl;
}

//NUM 2
#include<stdio.h">
void main()
{
printf("hello world/n");
}

用VC++ 6.0吧 可以写C 也可以写C++

要用prinf()就是用C的函数库include<stdio.h>而不是C++的iostream
#include <stdio.h>
int main()
{
printf( "Hello,world") ;
return 0;
}
建议用quincy

printf("hello world\n");