thanks for the reply hutch, sort of puzzled with what you did there, why is main being passed int argc, char* argv[]?
the rest i sort of understand, thanks
p.s. i believe you dont need to spam std::, use "using namespace std;" then you can simply use cout << and cin >>.
thanks for the reply abstract, i noticed that too that it only takes a string, but that was the code we were giving to work with. so i automatically assumed that im in the wrong.
sort of confused now, after looking at your code abstract, i thought the getter. was used to get the data, then the setter sets it to the bank account. but if this is the case the getter isnt passed anything (not my original code).
can you plz explain the purpose of the getter and setter? if the data is going directly to the setter the getter seems pointless... unless the getter retrieves the data at another point in the program to work with it? i always thought the getter, gets the primary data
Force of habit - they're a count and list of arguments passed into the program. You needn't worry about them just now - they don't affect your program at all. As I say, it's just habit.
Pieface wrote:
the rest i sort of understand, thanks
If there's anything that you're unsure of, please feel free to ask and I can explain.
Pieface wrote:
p.s. i believe you dont need to spam std::, use "using namespace std;" then you can simply use cout << and cin >>.
You can, yes, and in small programs it's usually fine to do so. In bigger programs that include multiple headers and make use of namespaces it could be a problem. Explicitly typing the namespace reduces chance of ambiguity (amongst other things) and, in my opinion, adds clarity. Again though, it's nothing you need to worry about at this stage. :-)
i understand this better now, i always thought that the getter gets the primary data then the setter sets it.. sort of misunderstood the lecture.
This is what ive got now, dont really understand what ive done wrong