I've been looking everywhere for this and the answer is probably really simple, but I haven't been able to find it. I have a homework problem (graded through a machine, the website is turingscraft.com) the problem is as follows
Objects of the BankAccount class require a name (string) and a social security number (string) be specified (in that order)upon creation. Define an object named account , of type BankAccount , using the values "John Smith" and "123-45-6789" as the name and social security number respectively.
now as my understanding goes the correct code should be as such
BankAccount account;
account.name = John Smith;
account.social security number = 123-45-6789;
however when I do this I get a crap ton of compiler errors, and when I try and do what the errors specify I get even more errors. can someone please help me with this problem? If I get this one I'm sure I can build off of it for future problems.
while I appreciate the help, the way the homework assignment works I am supposed to create an object called account of the class BankAccount which has already been defined for me. Sorry if that was unclear