Compare commits

..

No commits in common. 'master' and 'dev4' have entirely different histories.
master ... dev4

@ -1,10 +0,0 @@
#include <iostream>
#include <chrono>
#include <random>
#include <climits>
void atlasPrint() {
std::default_random_engine generator(static_cast<int>(std::chrono::steady_clock::now().time_since_epoch().count()));
std::uniform_int_distribution<int> distribution(INT_MIN, INT_MAX);
std::cout << "Generate a random integer: " << distribution(generator) << std::endl;
}

@ -1,15 +1,8 @@
#include <iostream> #include <iostream>
#include "atlas.h"
#include "worka.h"
#include "workb.h"
#include "Circle.h"
using namespace std; using namespace std;
int main() { int main() {
atlasPrint(); cout << "hello world" << endl;
MyClass().Print();
test().Print();
cout << Circle().Area() << endl;
return 0; return 0;
} }

@ -1,41 +0,0 @@
#ifndef WORKA_H
#define WORKA_H
#include <string>
#include <iostream>
using namespace std;
class MyClass
{
private:
string id; //id
int age;
string phone;
public:
MyClass() { //构造函数
id = string("empty id");
age = 20;
phone = string("13684598216");
}
MyClass(string id, int age, string phone) { //构造函数
this->id = id;
this->age = age;
this->phone = phone;
}
~MyClass() { //析构函数
}
void Print() { //输出函数
cout << "id是";
cout << id << endl;
cout << "age是";
cout << age << endl;
cout << "phone是";
cout << phone << endl;
}
};
#endif

@ -1,41 +0,0 @@
#ifndef WORKB_H
#define WORKB_H
#include <string>
#include <iostream>
using namespace std;
class test
{
private:
string id; //id
int age;
string phone;
public:
test() { //构造函数
id = string("empty id");
age = 21;
phone = string("15185626392");
}
test(string id, int age, string phone) { //构造函数
this->id = id;
this->age = age;
this->phone = phone;
}
~test() { //析构函数
}
void Print() { //输出函数
cout << "id是";
cout << id << endl;
cout << "age是";
cout << age << endl;
cout << "phone是";
cout << phone << endl;
}
};
#endif
Loading…
Cancel
Save