Skip to content

Instantly share code, notes, and snippets.

@mxrguspxrt
Created September 13, 2016 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxrguspxrt/912256645907b8cfbd2c381c492f4c77 to your computer and use it in GitHub Desktop.
Save mxrguspxrt/912256645907b8cfbd2c381c492f4c77 to your computer and use it in GitHub Desktop.
// Example program
#include <iostream>
#include <string>
using namespace std;
class Inimene {
public:
int vanus;
Inimene(int vanusParam) {
vanus = vanusParam;
}
};
int minVanus = 18;
bool tohibJuuaAlkoholi(Inimene* inimene) {
if (inimene->vanus > minVanus) {
cout << "Tohib juua alksi";
return true;
} else {
cout << "Ei tohi";
return false;
}
};
int main()
{
Inimene* inimene = new Inimene(21);
tohibJuuaAlkoholi(inimene);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment