Skip to content

Instantly share code, notes, and snippets.

@Gnomorian
Created December 22, 2021 13:38
Show Gist options
  • Save Gnomorian/c71686d22f932f454b0cf8c854f1b73f to your computer and use it in GitHub Desktop.
Save Gnomorian/c71686d22f932f454b0cf8c854f1b73f to your computer and use it in GitHub Desktop.
example for someone on discord
#include <iostream>
#include "SomeClass.h"
int main()
{
SomeClass some;
std::cout << some.addTen(10) << std::endl;
some.doSomething();
}
#include "SomeClass.h"
#include <iostream>
// implementation
void SomeClass::doSomething()
{
std::cout << "doing saomething" << std::endl;
}
int SomeClass::addTen(int from)
{
return from + 10;
}
#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