V
Vassilis Stratis
I have a very simple code which is consited of a simple class with a
constructor which takes an argument of type ifstream. Basically I
would like to provide a string in the main method which will
initialize a ifstream object and call the constructor... well I get
compiling errors...
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
class Demo
{ public:
Demo(ifstream);
};
Demo:emo(ifstream inputImg)
{ ifstream input = inputImg;
}
void main(char args[])
{ ifstream file = (args);
Demo d(file);
}
What's wrong with it??? I am just got started with C++ ;-)
Thanks!
constructor which takes an argument of type ifstream. Basically I
would like to provide a string in the main method which will
initialize a ifstream object and call the constructor... well I get
compiling errors...
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
class Demo
{ public:
Demo(ifstream);
};
Demo:emo(ifstream inputImg)
{ ifstream input = inputImg;
}
void main(char args[])
{ ifstream file = (args);
Demo d(file);
}
What's wrong with it??? I am just got started with C++ ;-)
Thanks!