Files
CPP/OOP/methodes/class_methode_outside.cpp
2025-04-29 21:21:54 +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
}