1、感觉面试的人或者学校考试爱出这样的题: Compare and contrast the loops you wrote in the previous two exercises. Are th
1、对vector的操作中,使用pushback来增加元素,而不是使用操作符仅用来 得到某一元素,并且这一元素要存在!这和数组不同。 2、vector<int>::const_itera
1、来看这段程序: char &get_val(string &str, string::size_type ix) { return str;
1、容易混淆的问题:ex2_31 (a) extern int ix = 1024; (b) int iy; (c) extern int iz; (d) extern const int &
1、在下面三种情况中,我们不使用copy的方式传递参数: (1)当我们需要函数改变argument的值的时候 (2)当我们要传递大对象的时候,copy就会有时间和空间上的浪费,这在现实的程 序
1、在do-while语句中,有个细节是应该要注意的,就是while (condition);在这个语句后面的分号千万不要忘记了,这和while是不同的 还有,如果do中定义的变量,由于作用域的问
1、int *pi = new int; 这样pi指向一个未初始化的整型变量,而 int *pi = new int(); 这样pi就指向一个初始化为0的整型变量 2、int i; i
1、21 % -5; // machine-dependent: result is 1 or -4 21 / -5; // machine-dependent: result -4 o
1、ex4_22: const char *cp = "hello"; int cnt; while (cp) { ++
1、对vector的操作中,使用pushback来增加元素,而不是使用操作符仅用来 得到某一元素,并且这一元素要存在!这和数组不同。