- 博客(7)
- 问答 (1)
- 收藏
- 关注
原创 面向对象C++注意事项
注意默认参数的定义如果一个类中的函数有默认参数,则只能在这个函数声明的时候写默认参数,在函数定义的时候不能写默认参数。//"Rectangle.cpp"#include <iostream>#include "Rectangle.h"using namespace std;Rectangle::Rectangle(coordinate lowerLeft , coordi...
2019-04-01 01:22:55 161
原创 cl.exe 编译注意事项(都是大坑)
1. cl 命令基本用法CL [option...] file... [option | file]... [lib...] [@command-file] [/link link-opt...]option : 一个或多个 CL 选项。file : 一个或多个源文件、.obj 文件或库的名称。CL 编译源文件并将 .obj 文件和库的名称传递给链接器。有关更多信息,请参见 CL 文件名语...
2019-03-18 01:39:33 4887
原创 Windows下用bazel安装Tensorflow
进入 tensorflow-master 文件夹,然后用 bazel 进行设置Administrator@DESKTOP-4CP46H0 MINGW64 /d/tensorflow-master$ ./configure但是出现下列错误信息WARNING: --batch mode is deprecated. Please instead explicitly shut down yo...
2019-03-15 12:51:49 1477 1
原创 string注意事项
getline()getline()函数的形参必须为string类型,不能是char[]string.append()形参必须为字符串,不能是char变量
2019-03-03 10:34:26 179
原创 vs2017中使用utf-8编码字符串
虽然vs2017可以用utf-8保存文件但是字符串常量无论如何都是用ansi编码的可以在字符串常量前加u8关键字强转为utf-8编码。
2019-03-03 02:05:01 3903
转载 C++ bitset 用法
转载出处:C++ bitset 用法C++的 bitset 在 bitset 头文件中,它是一种类似数组的结构,它的每一个元素只能是0或1,每个元素仅用1bit空间。下面是具体用法构造函数bitset常用构造函数有四种,如下 bitset<4> bitset1; //无参构造,长度为4,默认每一位为0 bitset<8> bitset2(12);...
2019-03-03 00:20:46 133
转载 C++读取txt文件
逐行读入复制代码void readTxt(string file){ifstream infile;infile.open(file.data()); //将文件流对象与文件连接起来assert(infile.is_open()); //若失败,则输出错误消息,并终止程序运行string s;while(getline(infile,s)){ cout&amp;amp;lt;...
2019-03-02 11:47:56 4245
空空如也
vscode debug C++ 时无法打开控制台(或者说运行不了 gdb.exe)?
2019-03-17
TA创建的收藏夹 TA关注的收藏夹
TA关注的人