hour04_3.cpp
来自「《24学时精通c++》的随书源码的下半部分。欢迎下载学习。」· C++ 代码 · 共 22 行
CPP
22 行
#include <iostream>
int main()
{
int a, b;
++a++;
// The line above should give you a compiler error! Comment it out.
// It doesn't really make sense to try to increment before
// and then after evaluation, does it? If you want to add 2
// you can do so with a += 2;
// or you can do something like:
b = ++a;
a++;
std::cout << "a is " << a << std::endl;
std::cout << "b is " << b << std::endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?