![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
hangyejiadao
这个作者很懒,什么都没留下…
展开
-
栈
/*-- Stack.h --------------------------------------------------------------- This header file defines a Stack data type. Basic operations: constructor: Constructs an empty stack empty: ...原创 2018-11-28 20:49:10 · 112 阅读 · 0 评论 -
汉诺塔
#include<iostream>#include<valarray>#include<iomanip>using namespace std;void move(unsigned n, unsigned& moveNumber, char source, char spare, char destination) { if (n == ...原创 2018-12-04 20:14:02 · 143 阅读 · 0 评论 -
g++编译多个文件
现有文件str.h str.cpp main.cpp编译这三个文件g++ str.cpp main.cpp -o main原创 2018-01-14 22:00:28 · 2167 阅读 · 0 评论 -
vscode调试c++配置
{ "version": "0.1.0", "command": "g++", "args": ["-g","${file}","-o","${file}.exe"], // 编译命令参数 "problemMatcher": { "owner": "cpp", "fileLocation": ["relative", "${wo原创 2017-12-17 10:12:55 · 1636 阅读 · 0 评论 -
给你三个string str oldstr newstr 用newstr替换str里的oldstr
#include #include #include using namespace std;/*void func(string &s, string &oldVal,const string &newVal){ string::size_type size = oldVal.size(); for (string::size_type i = 0;i<s.lengt原创 2017-12-01 18:18:59 · 1167 阅读 · 0 评论 -
c语言的自增自减练习
#include#includeint main(void){ int i=3; printf("%d,%d,%d,%d,%d",i++,++i,++i,i++,--i); getchar(); system("pause"); return 0;}输出:5,6,6,2,6原创 2017-11-29 21:37:45 · 2106 阅读 · 7 评论 -
c#Task的continuewith
Console.WriteLine("123"); Task task = new Task(() => { for (int i = 0; i < 20; i++) { Console.WriteLine("i");原创 2017-10-31 11:51:26 · 4375 阅读 · 3 评论 -
c++面试题
// cpp.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include<iostream>using namespace std;class A {public: A() { } virtual void f() { cout << "A::f()\n"; } void f()const {原创 2017-07-07 07:39:51 · 349 阅读 · 0 评论 -
c++面试题
// cpp.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#includeusing namespace std;class A {public: A() { } virtual void f() { cout << "A::f()\n"; } void f()const { cout << "A::f() const\n原创 2017-07-07 07:35:34 · 396 阅读 · 0 评论