Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gazliddon/68922e55eb0ccb609031a3c63f99984d to your computer and use it in GitHub Desktop.
Save gazliddon/68922e55eb0ccb609031a3c63f99984d to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string>
#include <iostream>
class ShitString {
public:
ShitString( char const *_str ) : mData( _str ) {
}
std::string const & get() const { return mData; }
protected:
std::string mData;
};
void test( ShitString test ) {
std::cout << test.get() << std::endl;
}
int main( int argc, char *argv[] ) {
ShitString str = "hello";
test(str);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment