一个超菜的问题
偶想问下用C++的语言怎么写一条打印出"hello world"的程序呢......................PS:可以骂偶但别砸偶 int main()
{
using namespace std;
cout << "Hello world." << endl;
return 0;
}
……其实我多数是用C的printf的 编译没通过哦?? ……应该缺些头文件而已,#include就行了,我忘了是哪个
← 从来不用C++库的人 偶知道是什么原因了,是后缀的问题, 偶用了 .c 所以一直无法通过 #include <iostream>
int main()
{
std::cout << "hello, world" << std::endl;
return 0;
} std:: ?
Why use this? 因為沒有 using namespace std;
結果全要手動加上std::
kurai懂中文便用中文把。。。遷就各位。。。 ok, that's good ........... 引用第7楼coolpay64于2007-09-10 21:12发表的:
因為沒有 using namespace std;
結果全要手動加上std::
kurai懂中文便用中文把。。。遷就各位。。。
well, what should add std if I dont use "using namespace std"?
btw, 不喜歡打中文. 我不會用高深英文的, Don't worry
页:
[1]
2