C++入门 输出Hello World
#include <iostream>using namespace std;int main(){
cout << "Hello, world!" << endl; return 0;}它等效于
#include <iostream>using namespace std;int main(){
cout << "Hello, world! \n"; return 0;}#include <iostream>using namespace std;int main(){
cout << "Hello, world!" << endl; return 0;}它等效于
#include <iostream>using namespace std;int main(){
cout << "Hello, world! \n"; return 0;}什么是注释呢?这简直是废话,就像您在读书时候做的笔记,复习的时候圈的重点,简单来说,它并不是程序的一部分,但是它可以进行解释程序的行为或者任何想加在程序里面的东西。它的格式就两种,第一种/* 我是注释 我还是注释 &nb...
#include <iostream> using namespace std; class fenshu { public: int xuehao; int yuwen; }; ...
#include<iostream> using namespace std; int main() { cout << "The size of int is&nb...
/*C风格字符串的声明和使用 #include<cstdio.h> int main() { char x[]={'H','e','l','l','o','&...