05 2023 档案
摘要:1 #include <iostream> 2 #include <fstream> 3 #include <string> 4 5 int main() { 6 std::ifstream inputFile("D://article.txt"); 7 8 if (!inputFile) { 9
阅读全文
摘要:1 #include <iostream> 2 #include <iomanip> 3 using namespace std; 4 class matrix{ 5 private: 6 int row,column; 7 int **mat; 8 public: 9 matrix(const m
阅读全文
摘要:1 #include <iostream> 2 using namespace std; 3 template<class T> 4 void swapData(T& a, T& b) 5 { 6 T t = a; 7 a = b; 8 b = t; 9 } 10 11 template<class
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 4 template<class T> 5 class mypair { 6 T a, b; 7 public: 8 mypair(T first, T second) 9 { 10 a = first; 1
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 class zhong 4 { 5 private: 6 int shi; 7 int fen; 8 int miao; 9 public: 10 zhong operator++() 11 { 12 mia
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 class Shape 4 { 5 public: 6 Shape(){} 7 ~Shape(){} 8 virtual float getArea() {} 9 }; 10 class Circle:pub
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 class BaseClass 4 { 5 public: 6 virtual void fn1(); 7 void fn2 (); 8 }; 9 void BaseClass::fn1() 10 { 11
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 class Shape 4 { 5 public: 6 Shape(){} 7 ~Shape(){} 8 virtual float getArea()=0; 9 virtual float getPerim
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 class Mammal 4 { 5 public: 6 Mammal() 7 { 8 cout<<"Mammal constructor...\n"; 9 } 10 ~Mammal() 11 { 12 co
阅读全文
摘要:1 #include<iostream> 2 #include<cmath> 3 using namespace std; 4 5 class Point 6 { 7 private: 8 int x; 9 int y; 10 int z; 11 public: 12 void Input(); 1
阅读全文

浙公网安备 33010602011771号