
C/C++
阿卡蒂奥
这个作者很懒,什么都没留下…
展开
-
MFC使用小结
MFC使用自我小结原创 2022-05-05 13:49:58 · 499 阅读 · 0 评论 -
c++读写txt与dat文件
1、创建dat/txt文件(若dat文件不存在时)并向其中写入数据#include <string>#include <iostream> #include <fstream> using namespace std;int main() { ofstream outfile("E:\\myfile.dat", ofstream...原创 2018-01-11 21:03:18 · 24862 阅读 · 3 评论 -
优化方法(C++)——0.618法、平均值法、单纯形法
1、0.618法// 0.618.cpp : 优化方法:0.618法确定一维搜索问题的搜索区间。//#include "stdio.h"#include "iostream"#include "math.h"using namespace std;//#define Lambda 0.618double f(double x) //输入 min f(x) f(x)的原创 2017-08-25 11:07:25 · 2777 阅读 · 0 评论 -
c++ 遍历文件夹中的文件
_finddata_t 结构体struct _finddata_t 是用来存储文件各种信息的结构体。 定义如下:struct _finddata_t{unsigned attrib;time_t time_create;time_t time_access;time_t time_write;_fsize_t size;char name[_MAX_FNAME];};原创 2018-01-12 15:14:50 · 30266 阅读 · 7 评论 -
c++ 计算几何图形面积(抽象类、虚函数的使用)
将一些类所具有的公共属性和方法放到基类中,避免重复定义。 定义基类Shape,在类中定义两个函数getName()、getArea()。分别用来获得类名称和面积。将getArea()定义为一个纯虚函数。#include "stdafx.h"#include <iostream>#include <string>using namespace std;co...原创 2018-05-02 14:02:52 · 6537 阅读 · 0 评论 -
c++ vector使用小结
string类使用总结原创 2018-07-20 15:41:31 · 941 阅读 · 0 评论 -
Visual Studio界面个性化-修改编辑器背景
今天是10.24了,分享点小福利。使用Visual Studio中的插件 IDE Text Background可以修改编辑器背景,但又不想让背景太影响代码查看。于是自己做了一些,分享一下。链接: https://pan.baidu.com/s/1brhudqLLOUQvmh5giOnErQ提取码: j1esIDE Text Background安装:vs里 工具–&amp;gt;扩展和更新–&amp;...原创 2018-10-24 18:37:04 · 8108 阅读 · 1 评论