![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
柯基的屁股敲可爱(๑• . •๑)
Let everything go
展开
-
vector容器的简单案例
test01()中容器中放int类型 test02()中容器中放类对象 test03()中容器中放类对象指针 test04()中容器嵌套容器。 #include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; class Person{ public: Person(string name,int age) { .原创 2021-01-22 13:14:24 · 95 阅读 · 0 评论 -
浮点数逆序输出(C++)
最近帮朋友看了这个问题,最终调试了出来,怕以后忘记,贴出来,有错误请指正。 #include<iostream> using namespace std; class fudian { public: fudian(const char *ss) { len=strlen(ss); s=(char*)malloc(len+1); strcpy(s,ss); } ...原创 2019-09-12 15:12:54 · 2322 阅读 · 0 评论 -
浮点数的逆序 --栈的实现
#include <iostream> using namespace std; struct Node{ // 定义结构体 char data; // 数据 struct Node *next; // 下一个节点 }; class Stack{ // 类定义 public: // 默认构造器(定义变量的时候会执行) St...原创 2019-09-12 20:23:47 · 245 阅读 · 0 评论