标识符不能是关键字标识符只能由字母、数字、下划线组成第一个字符必须为字母或下划线标识符中字母区分大小写#include<iostream>
using namespace std;
int main() {
int int = 10;//...
阅读全文...
C++-3-变量和常量
变量的意义方便我们管理内存空间例如在一个内存里存储了数字10,我们通过地址使用就很麻烦,但是我们给这个内存空间取名为a,用a就能直接调用变量的创建数据类型 变量名称 = 变量的初始值例如:int a = 10;#include<iostream&g...
阅读全文...
阅读全文...
C++-2-单行注释和多行注释
#include<iostream>
using namespace std;
int main() {
cout << "hello,world" << endl;
// 这是一行...
阅读全文...
阅读全文...
C++-1-书写第一个helloworld程序
#include<iostream>
using namespace std;
int main() {
cout << "hello,world" << endl;
return ...
阅读全文...
阅读全文...