cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
user name:
password:
Forgot your password?
please wait
try again
cancel
forgot your password?
sign up
log in
[Legacy version]
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
classes/vector noob question.
classes/vector noob question.
Nov 24, 2019 at 4:06am
Nov 24, 2019 at 4:06am UTC
Gerardo559
(15)
Cant figure out why my " a.review() " are not working/outputting anything just zero?
any help would be appreciated. and i know my code isn't the best :)
SOLVED.
Last edited on
Nov 25, 2019 at 4:13am
Nov 25, 2019 at 4:13am UTC
Nov 24, 2019 at 7:10am
Nov 24, 2019 at 7:10am UTC
salem c
(3712)
Maybe you should write to the member variables.
1
2
3
4
5
6
Review::Review(string n,
double
r, string t) { n = ReviewerName; r = rating; t = Text; }
Making your input parameters const would have diagnosed this problem.
Having a naming convention for member variables, like mReviewerName
would have made the statement n = mReviewerName stick out like a sore thumb.
Topic archived. No new replies allowed.