I have a Lexer class, and one of its members is an istream reference. I chose to make it an istream in order to support any kind of input streams that inherit from it - standard input, files, etc..
So Lexer's constructor takes an istream& and initializes the member to that:
In my main function, I create a new ifstream object, and I want to pass its reference to Lexer's constructor, but I can't seem to get it to work. How would I go about doing this?
Ah, you're right. It seems that Visual Studio was just highlighting the first argument as an error, but after building it there was another separate problem entirely.