Acclerated C++ 第0章
来源:互联网 发布:澳门十月初五饼家淘宝 编辑:程序博客网 时间:2024/06/04 17:42
0-0:
#include<iostream>
int main(){
std::cout << "hello,world" << std::endl;
return 0;
}
0-1: 3+4; 是一个表达式语句,会执行3+4,结果7将放在一个临时变量里. 这个表达式没什么意义~~.
0-2:
#include<iostream>
int main(){
std::cout << "This (*) is aquote, and this (//) is abackslash." << std::endl;
return 0;
}
ps: /" = " , /' = ' , // = / ;
0-3:
#include<iostream>
int main(){
std::cout << "********" << std::endl;
std::cout << "/ta" <<std::endl;
return 0;
}
/t 占8个字符宽
0-4:
#include <iostream>
using namespace std;
int main()
{
cout<< "#include<iostream>" << endl;
cout<< "int main()" << endl;
cout<< "{" << endl;
cout<< " cout <<\"hello, world!\" << endl;" << endl;
cout<< " return 0;" <<endl;
cout<< "}" << endl;
return0;
}
0-5: 不正确 少了 {} 和 return .
0-6;VC6下能运行 抱一个警告.
0-7; 不正确 /* 注释牵套了. 导致一部注释没被包含.
0-8;正确 //后的所以内容都被注释掉了
0-9; intmain(){}
0-10;
#include<iostream>
int
main
(
)
{
cout
<<
"hello, world"
<<
endl;
return
0;
}
- Acclerated C++ 第0章
- Acclerated C++ 第1章
- Acclerated C++ 第2章
- Acclerated C++ Exercise 5-0(list)
- 昨天开始学习Acclerated C++
- Acclerated c++之打印三角形
- Acclerated C++ Exercise 4-6
- Acclerated C++ Exercise 4-7
- [C/C++] 第12章 类 primer
- 第3章 Object c
- 第8章 C渣渣
- 【C++PrimerPlus】第10章
- 第1章 C语言程序设计
- Effective C++——导读(第0章)
- 【C专家编程】第8章-第11章
- c语言程序设计现代算法第8章第9题
- C++Primer第5版读书笔记(第2章)
- C++Primer第5版读书笔记(第3章)
- c 把一整数转换为字符串
- opensaml本地下载目录
- Python 在ubuntu下报 UnicodeDecodeError: 'ascii'错误
- Profibus-DP从站开发总结(转)
- 应用HttpClient来对付各种顽固的WEB服务器
- Acclerated C++ 第0章
- Poisson Distribution vs Binomial Distribution
- HOJ 2939 Coin Question-------放硬币游戏
- mysql
- poj2239
- INT_MIN
- GTD的几个概念
- fortran中类型
- 研磨设计模式学习笔记之单例模式