Skip to content

Instantly share code, notes, and snippets.

View thlgood's full-sized avatar

YUCOAT thlgood

View GitHub Profile
#include <iostream>
using namespace std;
template<typename T>
struct hello
{
void operator()(T& x)
{
cout << "What the F_CK:" << x << endl;
}
/**
*
* main() -> func() -> hello()
*
*/
#include <stdio.h>
void hello(int x)
{
template<class T>
struct print : public unary_function<T, void>
{
print(ostream& out) : os(out), count(0) {}
void operator() (T x) { os << x << ' '; ++count; }
ostream& os;
int count;
};
int main()