When trying to build a solution in MSVC, I keep getting this error, and I can't figure out what's wrong. I've looked and looked, but can't find any signs of a return type for the constructor. (But then again, I've had ~12 hours of sleep total this week and have been abusing caffiene to the point of criminality, so it's entirely possible that I'm just glossing over an otherwise blatantly obvious error :P )
Correct me if im wrong, but on this line of code: : deckSize(ds) you are trying to assign a constant a value, which isnt possible. if you want to decalare the const int in the beggining of the program you would put static infront of the code, so as in: staticconstint deckSize = 52;. All i can see that might fix it.
Apparently, I made changes to the wrong .h file (I have a copy of the file on the desktop that I open in Notepad) and yes, the Deck.h file that was in the Visual Studio Project folder was missing the closing ';'.
Sorry I wasted your time for such a silly mistake.
I guess it's time for a quick nap
The code "works", but you have memory leaks in it and checking for NULL after operator "new" is called is useless in that form, in case of failure it will throw an exception and the program will end without going further.