随笔分类 -  C++ Primer 5th Answer

C++ Primer Answer ch05
摘要:5.1空语句是;在程序的某个地方,语法上需要一条语句但是逻辑上不需要,此时应该使用空语句。5.2块(复合语句)是指用花括号括起来的(可能为空的)语句和声明的序列如果在程序的某个地方,语法上需要一条语句,但是逻辑上需要多条语句,则应该使用复合语句5.3#include using namespace std;int main(){ int sum = 0, val = 1; while(val using namespace std;bool find(int){ return true;}int main(){ /* string s = "132"; st... 阅读全文

posted @ 2013-11-05 15:32 buptbfan 阅读(303) 评论(0) 推荐(0)

C++ Primer Answer ch04
摘要:4.1#include using namespace std;int main(){ cout #include using namespace std;int main(){ vector vec = {1, 3, 5}; cout using namespace std;int main(){ cout using namespace std;int main(){ cout using namespace std;int main(){ short i1 = 32767; ++i1; cout using namespace std;in... 阅读全文

posted @ 2013-11-04 19:03 buptbfan 阅读(254) 评论(0) 推荐(0)

导航