Well, I'd like to keep it that way if I could.
But the ifsteam inputfile function chokes if I try to give it an std::string
Well, I'd like to keep it that way if I could.
But the ifsteam inputfile function chokes if I try to give it an std::string
Sometimes I forget what I am doing when I enter a room, actually, quite often.
that's the "as long as you can" bit
use std::string like this
that should work.Code:bool MS3DModel::Load_MS3D_Model(const std::string &Filename) { ifstream inputFile( Filename.c_str(), ios::in | ios::binary | ios::nocreate ); // more code here! }
"I saw a sign that said 'Drink Canada Dry', so I started"
-- Brendan Behan
Free Compiler: Visual C++ 2005 Express
If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?
Thats what I had in there about 10 posts ago
Sometimes I forget what I am doing when I enter a room, actually, quite often.
With the assert you mentioned:Code:bool MS3DModel::Load_MS3D_Model(const std::string &Filename) { assert(Filename.length() > 5 && Filename.substr(Filename.length() - 5) == ".ms3d"); ifstream inputFile( Filename.c_str(), ios::in | ios::binary | ios::nocreate ); // more code here! }
Except you were creating a temporary.Originally Posted by Shamino
And passing by value.
Yeah yeah , checkout the full system WIP, I posted about it..
Sometimes I forget what I am doing when I enter a room, actually, quite often.