I\'m having trouble with this piece of code , after i took this class from the main.cpp file and splitted it in to .h and .cpp the compiler started complaining about the def
Alright! It worked (a bit weird though because it was working fine when i had the whole code in one file).
I also had this problem when I started moving code around into multiple files. The real problem was that I forgot to write
#pragma once
at the top of the header file, and so it was redefining the functions multiple times (each time the header file was being invoked from a parent file), this caused the redefinition of default parameter error.