i have done everything so far but it is giving me just one error message saying end of file before left braces. pls can someone take a look at it for me plsssss
You need to have a semicolon after the closing brace of a class declaration.
Edit:
Please always use code tags - the <> button on the right you should know that by now with 24 posts.
It is not a good idea to have public get / set functions for each private member of a class. You might as well make all the members public!!!
Instead think about what actual operations you are going to do on the object? For example you could have a GetInput function that sets all the variables in one go. You also have constructors. You might also have a display function that prints out all the variable values.
class SavingsAcount : public Account { //deleted ;
private:
double interest_rate;
public:
setInterest_rate(double);
double getInterest_rate();
}; //keep this one
You nearly had it. As I said - need semicolon after the closing brace. You added one before the opening brace as well.
To work this out yourself - read the documentation / reference section at the top left of this page.
thank you i did all but the only error it says is the last line error code 1075, ie end of file found before left braces.
l appreciate your time for helping
class Account
{
private:
public:
Account();//default constructor
Account(int initialBalance){dataMember = initalBalance;
}
//constructor with parameter
Is there still a problem with this? There is a mismatch with something.
If you are using an IDE, you can set it up to take care of matching braces, parentheses etc. You should also be able to get it to create classes for you as well.
thanks alot for replying, it is not just debugging, still saying end of file. l tried rewriting it using another textbook and a link a friend gave me, still same thing. l am using visual basic c++, empty console as directed. let me paste what l did this morning again, l have not slept since yesterday.
hi darkestfright,
thank you for taking your time to reply me. l do have it on,i did rectified it last night, the only error is the end of file directory.
if you dont mind, let me paste it below pls