19 lines
442 B
C++
19 lines
442 B
C++
#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;
|
|
} |