menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
write the header file (.h file) of a class acc2 containing: a data member named sum of type int. a constructor accepting no parameters. a function named getsum that accepts no parameters and returns an
asked
Nov 2, 2023
30.3k
views
4
votes
write the header file (.h file) of a class acc2 containing: a data member named sum of type int. a constructor accepting no parameters. a function named getsum that accepts no parameters and returns an int.
Computers and Technology
high-school
Wyatt Barnett
asked
by
Wyatt Barnett
5.8k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
5
votes
// acc2.h
// c++ class header for acc2
class acc2
{
public:
// getsum()
int getsum()
{
return sum_;
}
// Default constructor
acc2()
{
sum_ = 0;
}
private:
int sum_;
}
SuperM
answered
Nov 8, 2023
by
SuperM
6.4k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
6.5m
questions
8.6m
answers
Other Questions
10 points Wireframing and storyboarding are helpful in which step of web development? Advertising Planning Printing Publishing
What is Blender's default save directory for movie AVI files?
If a website ends with .gov does it mean that its written by the government or?
To group option buttons so that selecting one deselects all of the others, you must make the ____ attribute the same.
How do I turn on your asus chromebook flip?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org