Hey there, I am working on this for an assignment and cannot figure out how to even get started to write the function for the following program.
The code given is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
#include <iostream>
#include <string>
#include "BACCOUNT.H"
using namespace std;
void display(const bankAccount & anAcct)
{
}
int main()
{
bankAccount a("Annie Hill", 123.00);
bankAccount b("Becker" , 45.60);
display(a);
display(b);
return 0;
}
|
and I need to write a display function that will make the name and balance for bankAccount a and bankAccount b display.
I've been working on this for about 3 days now, and cannot figure out how to even start.
Last edited on
Do you know what bankAccount
looks like?
Do you know how to output members of a class or struct?
Simply display the members of bankAccount.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
Forgot to add my output needs to read:
bankAccount: Hill, Annie, $123.00
bankAccount: Becker, Bob, $45.60
I understand how to display the members of bank account, its just the separating and organizing of them that's throwing be off.
Also I'm realllly new to c++ , so I'm sure I'm full of dumb questions.