Hi everyone! In this class example i can use N in the constructor, however in the function it doesn't work. What is the solution to this? P.S (I don't want to pass in the parameter in the function, cause i wasn't asked to).
Thank you in advance!
The first one is introduced on line 5. That is the member of class OneDComplexMatrix.
The other one appears on line 10. A parameter of the function. It hides (masks) the member N within the body of the function (lines 11-17). You could refer to the member N within the constructor with syntax: this->N.
You can use the member N on lone 23 just fine. Your problem is that you never initialize it with a known value.