相关分类: Java技术 C/C++ VB delphi
  • 重载矩阵加法运算 代码参考

    重载矩阵加法运算 代码参考 1 #include iostream 2 3 using namespace std; 4 5 class Matrix 6 { 7 private : 8 int a,b; 9 int arr[ 100 ][ 100 ]; 10 public : 11 Matrix() 12 { 13 for ( int i= 0 ;i 100 ;i++ ) 14 { 15 for ( int j= 0 ;j 100 ;j++ ) 16 { 17 arr...

    2020-04-29 16:02:16

  • 重载加法运算符的复数运算 代码参考

    重载加法运算符的复数运算 代码参考 1 #include iostream 2 3 using namespace std; 4 5 class Complex 6 { 7 private : 8 double real; 9 double image; 10 public : 11 Complex(){real= 0 ;image= 0 ;} 12 Complex( double a){real=a;image= 0 ;} 13 Complex( double...

    2020-04-29 16:01:15

  • STL之deque

    STL之deque deque即数组形式的双端队列。 #includeiostream #include deque #include algorithm using namespace std; int main(){ // 构造 deque int d = { 2 , 6 , 8 }; // 遍历 for (deque int ::iterator it = d.begin(); it d.end(); it++ ) cout * it; cout endl...

    2020-04-29 16:01:11

  • 莫比乌斯反演小记

    莫比乌斯反演小记 瞎搞 写在前面 这是蒟蒻第一次写这么长的博文 \(gyh\ nb\) , \(\text{OI-Wiki}\ nb\) 如果觉得写得凑合就点个支持吧 \(qwq\) 前置知识 积性函数、狄利克雷卷积、数论分块(这一篇去找gyh吧我讲也讲不好) (有空慢慢补) Mobius函数 定义 莫比乌斯函数...

    2020-04-29 16:01:00

  • 抽象宠物类的实现 代码参考

    抽象宠物类的实现 代码参考 1 #include iostream 2 #include string 3 4 using namespace std; 5 6 class Pet 7 { 8 private : 9 string name; 10 int age; 11 string color; 12 public : 13 Pet( string name, int age, string color) 14 { 15 this -name= name; 16 t...

    2020-04-29 16:00:30

  • 虚函数实现多态性 代码参考

    虚函数实现多态性 代码参考 1 #include iostream 2 3 using namespace std; 4 5 class Pet 6 { 7 public : 8 virtual void Speak(){cout " How does a pet speak? " endl;} 9 }; 10 11 class Cat: public Pet 12 { 13 public : 14 void Speak(){cout " miao!miao! " en...

    2020-04-28 16:01:22

  • 手写快读

    手写快读 #ifndef _GLIBCXX_read#define _GLIBCXX_read 1#progma GCC system_header#include cstdionamespace std _GLIBCXX_VISIBILITY(default){_GLIBCXX_BEGIN_NAMESPACE_VERSIONvoid pushint(int index,int pushindex){index*=10;index+=pushindex;}templatetypenam...

    2020-04-28 16:00:55

  • 每日干货丨C++语言主流开发工具推荐!

    每日干货丨C++语言主流开发工具推荐! C语言程序有多种开发工具,选择合适的开发工具,可以让读者更加快速地进行程序编写,接下来将针对几种主流的开发工具进行介绍,具体如下。 在使用C语言开发程序之前,首先要在系统中搭建开发环境。现在主流开发工具有很多种,接下...

    2020-04-28 16:00:42

  • STL之set

    STL之set set即集合,主要用来去除重复元素。 #includeiostream #include set #include unordered_set using namespace std; int main(){ // 构造 set int s{ 2 , 6 , 8 , 3 , 6 , 9 }; // 遍历 for ( set int ::iterator it = s.begin(); it != s.end(); it++ ) cout...

    2020-04-28 16:00:31

  • STL之map

    STL之map Map是STL的一个关联容器,它提供一对一的数据处理能力,其中第一个称为关键字,每个关键字只能在Map中出现一次,第二个称为该关键字的值(常称为键值对)。 #includeiostream #include map #include unordered_map #include algorithm #include string using...

    2020-04-27 16:00:24

首页 上一页 1 2 3 4 5 6 7 8 9 10 11 下一页 末页 119311925
2