当前位置:首页 > C++

C++

  • 最新
  • 浏览
  • 评论

C++ 数组的各类性质和用法

chanra1n3年前 (2020-11-03)C++3624
C++ 数组的各类性质和用法
#include<iostream>  using namespace std; void addarr(int *k,int len); //文中形如sizeof(x)/sizeof(x[0]) 是用数组占用空...

数据结构

chanra1n4年前 (2020-10-28)C++3998
数据结构
#include<iostream> using namespace std; struct books{ char name[10]; int num; float price; }book; int&nb...

C和C++中的字符串

chanra1n4年前 (2020-10-28)C++4125
C和C++中的字符串
/*C风格字符串的声明和使用  #include<cstdio.h> int main() { char x[]={'H','e','l','l','o','&...

Break和Continue的区别

chanra1n4年前 (2020-10-28)C++4273
Break和Continue的区别
#include<iostream>  using namespace std; int main() { int x=0; for(x=0;x<10;x++) { if(x==3) break;...

变量作用域

chanra1n4年前 (2020-10-28)C++4184
变量作用域
#include<iostream> void print(); int main() { char a=0; for(a=0;a<20;a++) print(); return 0;  }  v...

函数声明和使用

chanra1n4年前 (2020-10-28)C++4349
函数声明和使用
#include<iostream> using namespace std; int sum(int a,int b);//函数声明  int main() { cout <<&nb...

数据类型及其占用空间

chanra1n4年前 (2020-10-28)C++4109
数据类型及其占用空间
#include<iostream> using namespace std; int main() { cout << "The size of int is&nb...

C++入门 输出Hello World

chanra1n4年前 (2020-10-28)C++4174
C++入门 输出Hello World
#include <iostream>using namespace std;int main(){     cout << "Hello, world!...

C++的继承和派生

chanra1n5年前 (2019-11-06)C++4539
C++的继承和派生
#include <iostream> using namespace std; class fenshu { public: int xuehao; int yuwen;  }; ...

C++的类和对象

chanra1n5年前 (2019-11-06)C++4149
C++的类和对象
什么是类和对象?张三找了一个女朋友,她的女朋友就是他的对象。搞笑一下,打个比方,我们都是人类,人类这个类的一个成员(对象)。怎么创建类呢?#include <iostream> using namespace std; class fenshu...