I just tried running my program after defining the fBullCowGame::reset() function and am getting this error;
Severity Code Description Project File Line Suppression State
Error C3867 ‘fBullCowGame::reset’: non-standard syntax; use ‘&’ to create a pointer to member BullCowGame c:\users\scott_yoc1uey\documents\visual studio 2015\projects\bullcowgame\bullcowgame\bullcowgame.cpp 42
here is what I have;
#include "stdafx.h" #include "fBullCowGame.h"
fBullCowGame::fBullCowGame(){ reset(); } int fBullCowGame::getMaxTries() const { return myMaxTries; } int fBullCowGame::getCurrentTry() const { return myCurrentTry; }
void fBullCowGame::reset() { constexpr int MAX_TRIES = 8; myMaxTries = MAX_TRIES; myCurrentTry = 1; return; }
EDIT: FIXED Just forgot to put a () after function call in main code