ICode9

精准搜索请尝试: 精确搜索
  • 参数污染2022-08-04 02:31:15

    先看事例 可能造成参数覆盖 服务器的处理机制 HPP(参数污染延伸出来的漏洞)

  • 类模板分文件编写2022-07-22 08:33:00

    //template.hpp #include <iostream> template<class typeName> class Person { public: Person(typeName name); void show(); protected: typeName m_name; }; template<class typeName> Person<typeName>::Person(typeName name):

  • c++11 json解析库json.hpp2022-06-17 18:33:58

    地址 https://github.com/nlohmann/json  使用时,直接#include "json.hpp" 再using namespace nlohmann; string jsonStr = R"({"id": 1, "name":"vivo"})";//第2个参数是错误处理,第3个参数是不throw exceptionnlohmann::json jr = json::parse(j

  • 一个简单计算游戏 fps 的小工具2022-05-19 12:01:00

    /* fps.hpp sdragonx 2018-01-08 06:31:24 // 计算 fps 的小工具,以秒计数的。 */ #ifndef FPS_HPP_20180108063124 #define FPS_HPP_20180108063124 #include <time.h> namespace cgl{ int fps_stats() { static int fps_total = 0; static int fps = 0; stat

  • 两个栈实现一个队列2022-02-20 17:32:49

    使用两个栈实现一个队列,实现添加方法appendData,实现删除对头元素方法deleteData,实现查看对头元素headData方法 思路:栈是现金后出的数据结构,队列是先进先出的数据结构。可以使用第一个栈存入数据实现appendData。需要删除或者查看队头元素时,如果第二个栈为空,把第一个栈的数据

  • 在VS项目中通过GIT生成版本号作为编译版本号2022-01-12 13:32:29

    在VS项目中通过GIT生成版本号作为编译版本号 首先获取git版本信息 :: git rev-parse --abbrev-ref HEAD 获取当前分支名称 for /f %%i in ('git rev-parse --abbrev-ref HEAD') do (set BRANCH=%%i) :: git rev-list HEAD -n 1 获取当前分支最近一次提交的hash值 for /f %%i

  • unix2dos命令行工具的使用2022-01-06 09:33:46

    E:\client-master\debug_client\frameworks\runtime-src\Classes>for /R %G in (*.c *.hpp *.h *.cpp) do unix2dos "%G"利用SourceTree自带的unix2dos命令行工具将文档格式批量转换为Windows(CR LF)step1:PATH环境变量新增:C:\Users\001\AppData\Local\Atlassian\SourceTree\g

  • 实验四 继承2021-12-05 13:31:16

    实验任务4 pets.hpp: #ifndef PETS_HPP #define PETS_HPP using namespace std; #include<iostream> #include<string> class MachinePets { public: MachinePets() {}; MachinePets(const string s) { nickname = s; } string get_nick

  • 实验42021-12-01 11:03:45

    task3 Battery.hpp #ifndef BATTERY_HPP #define BATTERY_HPP #include<bits/stdc++.h> using namespace std; class Battery { public: Battery(int a=70):capacity(a){} int get_capacity(){ return this->capacity; }

  • 实验四 继承2021-11-30 15:00:58

    实验任务 二 tsak2.cpp文件源码 #include <typeinfo> // definitation of Graph class Graph { public: virtual void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; // definition of Rectangle, derived from Graph class Re

  • 实验四 继承2021-11-29 18:02:58

    task2.cpp #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: virtual void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; // definition of Rectangle, derived from

  • 实验四 继承2021-11-28 22:02:23

    实验任务二 #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: virtual void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; // definition of Rectangle, derived from Gra

  • 实验四 继承2021-11-28 21:02:46

    实验任务二 task2.cpp task2.cpp(虚函数) 总结: 1.同名覆盖原则 派生类与基类中有相同成员时:若未强行指名,则通过派生类对象使用的是派生类的同名成员; 2. 二元作用域分辨符 如果成员函数中定义了和类域中的变量同名的变量,则类域中的变量被块作用域中的变量隐藏。这时可以在

  • 实验四2021-11-27 20:00:59

    任务三 Battery.hpp #pragma once #include<iostream> using namespace std; class Battery { public: Battery(float n=70) :capacity{ n } {} float get_capacity() { return capacity; } ~Battery() = default; private: float capacity;

  • 实验四2021-11-27 14:04:20

    #ifndef BATTERY_HPP #define BATTERY_HPP class Battery { private:double capacity; public:Battery(double ca = 70) :capacity(ca) {} double get_capacity() const { return capacity; } }; #endif #ifndef ELECTRICCAR_HPP #define ELECTRICCAR_HPP #include&q

  • 【实验四】继承2021-11-26 16:35:23

    目录任务2任务3任务4 任务2 task2.cpp #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; // definition of Rectangle, deri

  • 实验四 继承2021-11-25 09:02:03

    实验结论: 实验任务2: 源代码: #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; // definition of Rectangle, derived fro

  • 实验四 继承2021-11-25 02:01:41

    task2 //origin #include<iostream> #include<typeinfo> using namespace std; //definition og Graph class Graph { public: //声明时加入关键词virtual void draw() { cout << "Graph::draw(): just as an interface\n"; }; }; //defini

  • 面向对象->实验报告四(C++)2021-11-25 01:32:06

    task3 题目要求 源码 main.cpp #include <iostream> #include "electricCar.hpp" int main() { using namespace std; // test class of Car Car oldcar("Audi", "a4", 2016); cout << "--------oldcar's info

  • 实验四 继承2021-11-24 23:32:19

    ------------恢复内容开始------------ //task2.cpp #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; // definition

  • SLAM框架:MULLS中的预处理文件cprocessing.hpp注释解析2021-11-24 16:34:04

    激光slam框架,论文题目: MULLS: Versatile LiDAR SLAM via Multi-metric Linear Least Square 开源代码链接: https://github.com/YuePanEdward/MULLS 最近在做一些特征提取的工作,发现MULLS框架对前端特征提取部分分的比较细致,特地阅读了一下论文和源码。以下是对预处理文件cproces

  • 实验4 继承2021-11-22 19:31:56

    实验二 1 #include <iostream> 2 #include <typeinfo> 3 4 // definitation of Graph 5 class Graph 6 { 7 public: 8 void draw() { std::cout << "Graph::draw() : just as an interface\n"; } 9 }; 10 11 12 // definition of

  • 似乎只需要在cpp文件 #include<opencv2\opencv.hpp> 就可以调用opencv里面所有的函数或者说函数接口了?2021-11-07 09:05:38

    似乎只需要在cpp文件 #include<opencv2\opencv.hpp> 就可以调用opencv里面所有的函数或者说函数接口了? 因为我看了下《OpenCV4快速入门》里面的cpp文件都是这样 这么看来opencv库用起来还是挺方便的。 这个说opencv.hpp已经include了opencv各个模块的头文件了。 https://blog

  • 实验2 数组、指针与c++标准库2021-10-30 17:35:24

    info.hpp: #ifndef INFO_HPP #define INFO_HPP #include<iostream> #include<string> using namespace std; class Info{ public: Info(string a,string b,string c,int d) : nickname(a),contact(b),city(c),n(d){} void print(){ cout << &quo

  • 实验二 数组、指针与c++标准库2021-10-30 10:34:13

    实验结论: 实验任务5: Info.hpp #ifndef Info_hpp #define Info_hpp #include<iostream> #include<string> #include<vector> #define capacity 100 using namespace std; class Info { public: Info(string x, string y,string z, int n0):nickname

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有