Recently this declaration thing is confusing me.
There are two different files, one is score.cpp and the other iscurve1.cpp. The second class Curve1 is inherited from the first class Score.
In score.cpp, I have declared:
ipScore = new int[getSize()];.
This is compiling fine and working without any issues. But when in curve1.cpp, I declare another variable:
new_ipScore = new int[getSize()];
It's saying that 'new_ipScore' : undeclared identifier and
'=' : cannot convert from 'int *' to 'int'
What's the problem here? Anyone can help?
new_ipScore?new_ipScore = new int[getSize()];the declaration? If it's not, then whyipScore = new int[getSize()];is working without any errors? ThanksipScoreis probably declared. No,new_ipScore = new int[getSize()];isn't a declaration, it's an assignment to an already declared variable.int* new_ipScore = ...would be a declaration + initialization.ScoreHaha thanks any way ;) huff