c++基础
secret125
这个作者很懒,什么都没留下…
展开
-
将c、c++变为python
4.在同级目录下放python.h(去conda的env里面找)2.编写头文件(声明变量)3.编写.i文件,用于链接。5.下载swig运行代码。6.编写setup.py。7.运行setup.py。生成_wrap.cxx。原创 2024-02-29 22:48:16 · 2157 阅读 · 0 评论 -
2022 vs code 编译运行c++
1.软件下载:编译软件:x86_64-w64-mingw32(当然,你也可以用别的,能编译c++就行)vscode(不用我解释这是干嘛的了吧)1.vscode安装随意,记得路径就好(ps:不要用中文,很多bug)2.vscode插件安装安装这几个插件(什么,你不知道怎么安装?!!)3.配置软件环境变量win打开搜索框(点下win就好),输入高级系统设置,打开这个界面点击环境变量,然后点击path,点击编辑,新建新建...原创 2022-04-11 01:26:29 · 2494 阅读 · 0 评论 -
分数类(类与构造)
题目描述完成下列分数类的实现:class CFraction{private: int fz, fm;public:CFraction(int fz_val, int fm_val) ;CFraction add(const CFraction &r); CFraction sub(const CFraction &r); CFraction mul(const CFraction &r); CFrac...原创 2022-04-05 13:03:35 · 370 阅读 · 0 评论 -
*p++,*++p等的区别
#include <iostream>using namespace std;int main(){ int a[4] = { 1, 4, 7 ,9},n=1; int *p = a; cout << *p << endl; cout << *p++ << endl; cout << p << endl; cout << *p << end...原创 2022-03-20 20:21:38 · 343 阅读 · 0 评论