Skip to content

Instantly share code, notes, and snippets.

@Intrepidd
Created July 25, 2011 14:31
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 Intrepidd/1104248 to your computer and use it in GitHub Desktop.
Save Intrepidd/1104248 to your computer and use it in GitHub Desktop.
C++ static
#include <iostream>
#include "klass.hh"
int Klass::doSomething(void)
{
std::cout << "Hello world" << std::endl;
return (42);
}
#ifndef __KLASS__
# define __KLASS__
class Klass
{
public:
static int doSomething(void);
};
#endif
#include "klass.hh"
int main(void)
{
Klass::doSomething();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment