Skip to content

Instantly share code, notes, and snippets.

@sebhtml
Created January 28, 2014 15:03
Show Gist options
  • Save sebhtml/8669188 to your computer and use it in GitHub Desktop.
Save sebhtml/8669188 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <fstream>
#include <stdint.h>
using namespace std;
class Test {
private:
uint64_t m_value;
public:
Test();
~Test();
void setValue(uint64_t value);
};
Test::Test(){
}
Test::~Test(){
}
void Test::setValue(uint64_t value) {
m_value = value;
}
istream & operator>> ( istream & stream, Test & handle ) {
uint64_t value = 0;
stream >> value;
handle.setValue(value);
return stream;
}
int main() {
ifstream f("test4.in");
/*
uint64_t value = 0;
f>> value;
*/
Test mockup;
f >> mockup;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment