Moved to static that should have been done at first
This commit is contained in:
1 parent
f0daf29917
commit
8659174a14
6 files changed
+14
-13
No files matched your search
+1
-4
@@ -6,9 +6,6 @@ using namespace std;
|
||||
|
||||
class Intro {
|
||||
public:
|
||||
|
||||
void mainIntro();
|
||||
private:
|
||||
|
||||
static void mainIntro();
|
||||
};
|
||||
|
||||
@@ -15,5 +15,6 @@ class Print{
|
||||
static void printl(string text);
|
||||
static void println(string text);
|
||||
static void type(string text);
|
||||
static void blank_line();
|
||||
|
||||
};
|
||||
+1
-3
@@ -3,8 +3,6 @@
|
||||
using namespace std;
|
||||
|
||||
class Title{
|
||||
private:
|
||||
protected:
|
||||
public:
|
||||
void mainTitle();
|
||||
static void mainTitle();
|
||||
};
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#include "include/intro.h"
|
||||
|
||||
void Intro::mainIntro(){
|
||||
cout << "The world didn't end with a bang. It ended with a groan.. and the scratching of death fingers against steel shutters." << endl;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(3000));
|
||||
Print::blank_line();
|
||||
Print::type("The world didn't end with a bang. It ended with a groan.. and the scratching of death fingers against steel shutters.");
|
||||
}
|
||||
+5
-4
@@ -2,9 +2,10 @@
|
||||
|
||||
int main (){
|
||||
system("clear");
|
||||
Title title;
|
||||
title.mainTitle();
|
||||
Intro intro;
|
||||
intro.mainIntro();
|
||||
//Title title;
|
||||
Title::mainTitle();
|
||||
//Intro intro;
|
||||
Intro::mainIntro();
|
||||
//cin >> ;
|
||||
return 0;
|
||||
}
|
||||
@@ -24,3 +24,7 @@ void Print::type(string text){
|
||||
cout << endl;
|
||||
delete[] charArray;
|
||||
}
|
||||
|
||||
void Print::blank_line(){
|
||||
cout << endl;
|
||||
}
|
||||
Reference in new issue
Block a user