Created
January 28, 2014 15:03
-
-
Save sebhtml/8669188 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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