Wow...nevermind...im so stupid...Thank you.
Wow...i feel really bad...hahha...
This is a discussion on Memory Address within the C++ Programming forums, part of the General Programming Boards category; Wow...nevermind...im so stupid...Thank you. Wow...i feel really bad...hahha......
Wow...nevermind...im so stupid...Thank you.
Wow...i feel really bad...hahha...
Due to the stupid newlines being left in the buffer. But you realize that, don't you?
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
operator >> eats whitespace. That wasn't his problem. He likely did something like
But I'm not going to compile that.Code:#include <iostream> #include <fstream> #include <ostream> int main () { std::ifstream hexin( "foo.txt" ); if ( hexin.is_open() ) { unsigned long foo; std::ios_base::fmtflags originalfmt = hexin.flags(); hexin >> std::hex >> std::fixed; while ( hexin >> foo ) { std::cout << foo << std::endl; } hexin.flags( originalfmt ); } }
Originally Posted by phantomotap
Hmm. So it does. News to me.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^