Files
CPP/OOP/class_methode_outside.cpp
rattatwinko 79670e7723 some more
2025-04-29 20:53:38 +02:00

23 lines
523 B
C++

#include <iostream>
/*
Here we have a Class which has a Function that is declared outside of the Class itself ;
We just reference the Function inside the class and later outside create a Function with this structure:
class::function()
*/
using namespace std;
class outside {
public:
void coolFunc();
};
void outside::coolFunc() {
cout << "I am a cool Outside Function\n";
};
int main() {
outside classobj;
classobj.coolFunc(); // No cout needed here for some reason ; idk why
}