G
Gary Wessle
Hi
I need to save on open(ing) ifstream in a loop, so I thought to have a
map<string, ifstream> where the input streams are open all them time.
class A
{
std::map<std::string, std::ifstream> m_is;
public:
void populate_the _stream();
};
A::A()
{
for( vector<string>::iterator i = files_vec.begin(); i !=
files_vec.end(); i++ )
{
m_is[*i] = ifstream (*i)( f.c_str() );
hummmm
not sure.
thanks for helping
I need to save on open(ing) ifstream in a loop, so I thought to have a
map<string, ifstream> where the input streams are open all them time.
class A
{
std::map<std::string, std::ifstream> m_is;
public:
void populate_the _stream();
};
A::A()
{
for( vector<string>::iterator i = files_vec.begin(); i !=
files_vec.end(); i++ )
{
m_is[*i] = ifstream (*i)( f.c_str() );
hummmm
not sure.
thanks for helping