some more
This commit is contained in:
19
OOP/class_methodes.cpp
Normal file
19
OOP/class_methodes.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
/*
|
||||
Within a Class you can define Functions (called Methodes) ; you can define these to all datatypes you want but just be careful to not segfault
|
||||
*/
|
||||
|
||||
using namespace std;
|
||||
|
||||
class MethodConstruction {
|
||||
public:
|
||||
void myCoolFunction() {
|
||||
cout << "I am a very Cool Function and I got called!\n";
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
MethodConstruction classobj;
|
||||
classobj.myCoolFunction();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user