📄 hour04_1.cpp
字号:
#include <iostream>
int main()
{
int a;
// Compile and run with only the first (a = a + 1) line uncommented.
// Compile and run with only the second (a += 1) line uncommented.
// Compile and run with only the third (a++) line uncommented.
// You may see a size difference in the executable (but it will be small)
// However, the compiler may decide that the statement you entered can be
// replaced with the faster/simpler form (second or third line) and then
// you will see no difference -- this is optimizing!
// You probably won't see a time difference since it is really so small (and
// optimization may occur)
a = a + 1;
// a += 1;
// a++;
std::cout << "result is " << a << std::endl;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -