2023年6月22日

摘要: #include<iostream> using namespace std; int main() { int arr[10]={1,2,3,4,5,6,7,8,9,20}; cout<<"整个数组所占内存空间为"<<sizeof(arr)<<endl; cout<<"每个元素所占内存空间为"<< 阅读全文
posted @ 2023-06-22 23:43 qwwqsa 阅读(47) 评论(0) 推荐(0) 编辑
 
摘要: int main() { int a=10; int b=10; //const修饰的是指针所以指针指向可以修改但指针的值不可以更改 const int *p1=&a; p1=&b; // *p1=100; //const修饰的是常量 指针指向不可以更改 指针指向的值可以修改 int *const 阅读全文
posted @ 2023-06-22 23:17 qwwqsa 阅读(18) 评论(0) 推荐(0) 编辑

2023年4月30日

摘要: #include<iostream> #include<stdio.h> #define MAXSIZE 50 typedef struct { int data[MAXSIZE]; int top; } SqStack; // 初始化栈 void InitStack(SqStack &s) { s 阅读全文
posted @ 2023-04-30 14:40 qwwqsa 阅读(26) 评论(0) 推荐(0) 编辑
 
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 #define ElemType int 5 6 // 定义队列结点 7 typedef struct QNode 8 { 9 ElemType data; 10 struct QNode* next; 1 阅读全文
posted @ 2023-04-30 14:32 qwwqsa 阅读(13) 评论(0) 推荐(0) 编辑
 
摘要: #include<stdio.h>#include<stdlib.h> typedef struct LinkNode{ int data; struct LinkNode *next; } LinkNode; typedef struct Link{ LinkNode *front,*rear;/ 阅读全文
posted @ 2023-04-30 08:39 qwwqsa 阅读(9) 评论(0) 推荐(0) 编辑

2023年4月29日

摘要: #include<stdio.h> #include<stdlib.h> typedef struct LinkNode { int data; struct LinkNode *next; } LinkNode; typedef struct Link { LinkNode *front,*rea 阅读全文
posted @ 2023-04-29 20:45 qwwqsa 阅读(24) 评论(0) 推荐(0) 编辑
 
摘要: 进行地址传递是出现报错 临时值不能作为非常量引用参数进行传递 所以需要在main函数中·重新定义指针传递 阅读全文
posted @ 2023-04-29 20:40 qwwqsa 阅读(52) 评论(0) 推荐(0) 编辑

2022年8月15日

摘要: #include<iostream> #include<string> #include<map> using namespace std; int main() { // c++ 里面的map容器的迭代器里面 有个first 和 second,分别指向键值和数值 map<string ,strin 阅读全文
posted @ 2022-08-15 15:47 qwwqsa 阅读(232) 评论(0) 推荐(0) 编辑
 
摘要: 1.之前运行的程序没有关闭,关闭后即可通过编译。 2.项目中出现了两个main函数入口 阅读全文
posted @ 2022-08-15 15:33 qwwqsa 阅读(1459) 评论(0) 推荐(0) 编辑

2022年8月14日

摘要: #include<iostream>using namespace std;#include<string>#include<vector>class Solution{ private: vector<vector<int >> result; vector<int > path; void ba 阅读全文
posted @ 2022-08-14 22:59 qwwqsa 阅读(46) 评论(0) 推荐(0) 编辑