- #71
yungman
- 5,755
- 293
You are right, In the book, they should be private. But that shouldn't make a difference as the source.cpp doesn't call any of that. I agree that's a bad practice though.jtbell said:I don't use VS, so I won't comment on the error messages specifically (at least now). However one thing jumps out at me immediately when looking at your code.
In invItem.h, I suspect that description, cost and units (lines 5,6,7) are intended to be the private member data of an object of class invItem. In their current location, they are outside of the class definition which begins at line 8. They should be inside the class definition, below the current line 10 which marks the beginning of the private section.
I'll try to put those inside Private and see what happen.
ThanksEDIT:
I put all those in Private. I updated post#67. You can take a look to verify. I copy into the new project, it works. but in the original project, the error window is exactly the same as in post #67.
Last edited: