OO C++ - Virtual Methods
- by Phorce
Just a really quick question here. I'm using virtual functions to read in from a text file. Now, it's virtual because in one aspect I want the values to be normalised, and, in the other respect I don't want them to be normalised. I have tried to do this:
bool readwav(string theFile, 'native');
So in theory, if the 'native' is used, this method should be called, however, if 'double' is called then a different version of the method is called. Same for if the value is empty, it should just perform the native option.
First question, why doesn't the declaration above work? Also, is this the best route to go down? Or, would it be better to have just one class method that switches between the options.
Thanks :)