Created
December 22, 2021 13:38
-
-
Save Gnomorian/c71686d22f932f454b0cf8c854f1b73f to your computer and use it in GitHub Desktop.
example for someone on discord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "SomeClass.h" | |
int main() | |
{ | |
SomeClass some; | |
std::cout << some.addTen(10) << std::endl; | |
some.doSomething(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SomeClass.h" | |
#include <iostream> | |
// implementation | |
void SomeClass::doSomething() | |
{ | |
std::cout << "doing saomething" << std::endl; | |
} | |
int SomeClass::addTen(int from) | |
{ | |
return from + 10; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <vector> | |
// definition | |
class SomeClass | |
{ | |
std::vector<int> someNumbers; | |
public: | |
void doSomething(); | |
int addTen(int from); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment