- 博客(15)
- 收藏
- 关注
原创 mmcv与CUDA、pytorch版本对应及安装
先查看需要安装的mmcv版本,1.x和2.x两者完全不一样。找到对应的pytorch版本后,切换至对应的CUDA版本。conda安装对应版本的python、Pytorch。对版本CUDA安装与切换可以参考。
2024-11-05 13:31:05
1375
原创 排序算法
void bubble_sort(int v[],int n){ for (int i = 0; i < n-1; i++) { for (int j = 0; j < n -1- i; j++) { if (v[j] > v[j + 1]) { swap(v[j], v[j + 1]); } } }}void choose_sort(int v[], int n){ for (int i = 0; i < n; i++) {
2021-05-15 16:51:26
90
原创 STL容器(未完成
一、string#include<iostream>#include<string>using namespace std;/*assign , append , find , rfind , replace , compare , at , insert , erase , string substr(int pos = 0, int n = npos) const; 返回由pos开始的n个字符组成的字符串*/int main(){ string s1
2021-04-17 16:46:34
87
原创 点,线,面,体
未完成,慎重#include<iostream>#include<fstream>#include<vector>#include<iomanip>#include<string>using namespace std;static int sum = -1;class Point{public: int getx() { return _x; } int gety() { return _y; } int getz().
2021-03-28 17:18:34
185
原创 2048
#include<iostream>#include<ctime>#include<cstdlib>#include<conio.h>#include <iomanip>#include<vector>#include<stdlib.h>#define _CRT_SECURE_NO_DEPRECATE#define _CRT_NONSTDC_NO_DEPERECATE#define up 72 /
2021-03-07 14:14:48
77
原创 C++primer reading notes
假定$是操作系统提示符,可通过“ $ addItems outfile ”使得已经编译的名为addItems.exe 的可执行文件调用infile文件中的数据,并将输出结果写入名为outfile的文件中(两个文件都位于当前目录中)。因为引用不是对象,因此不能定义指向引用的指针 、引用的数组、引用的引用。 int a = 9; int& b = a; int* c = &b;//此处实际上仍是对a操作 //下面都为错误示范 //int&* d = &b;此才为.
2021-01-22 15:44:41
179
原创 类(待补充)
#include<iostream>using namespace std;class rectangle {//定义一个类(矩形)public: int a, b;//定义长和宽(成员变量)。 void inti(int a_, int b_);//设置长和宽。 int area(int, int);//括号内的可以去。 int perimeter();//定义成员函数private: int c;//};void rectangle::inti(int a_, int
2021-01-11 22:03:39
67
原创 12.18work
2)#include<iostream>#include<cmath>#include<vector>using namespace std;int fun(int a);void Swap(int &a, int &b);int ord(vector<int>&, int);int main() { int a[5] = { 19,67,24,11,17 }, b[5] = { 2,3,9,17,59 }; in.
2020-12-25 23:46:15
159
3
原创 12.5 C++work
题目 1、已知一个矩阵,存储在一个二维数组中。将矩阵中和值为最大的那一行元素与首行对换。#include<iostream>#include<cmath>using namespace std;int main(){ double s[10] = { 0 }; int z = 0,b,c; cout << "请输入矩阵的行与列,并再依次输入矩阵元素" << endl; cin >> b>> c; int a[10][
2020-12-06 17:57:51
194
原创 复合类型、string、vector。
#include<iostream>using namespace std;int main() { int b = 1, c = 1; const int a = 1; const int& r1 = a;//必须用const修饰,且不能更改r1,a的值。 auto& r2 = r1;//引用时auto保留const。 decltype(r2)r3 = r2;//r3为const对象。 const int&& r4 = r3+1;//此时r4的
2020-11-18 23:33:04
107
原创 vs2019各类遇到的问题。
1.编译时出现大量莫名文件,导致的错误。1.找到下载器中单个组件的“Windows 通用 CRT SDK”。2.打开项目文件,点击工具栏中的调试,打开属性,更改Windows SDK版本,应用。2.安装时找不到与下列参数匹配的产品。1.直接删除C:\ProgramData\Packages文件,然后再启动安装程序,2.如果在C盘看不到C:\ProgramData目录,是因为该文件为类型为“隐藏的项目”, 所以需要将查看属性勾上显示隐藏文件项,然后就可以在C盘看到了。3.如果提示无删除权限,则需
2020-11-16 23:07:18
968
原创 11.11上机作业C++
1,排序问题。#include<iostream>#include<cmath>using namespace std;int main(){ double a, b, c, d; cout << "请输入三个数"; cin >> a >> b >> c; if (a >= b && b >= c) { cout << a << b << c; }
2020-11-13 23:06:55
195
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人