When is it best to use a function prototype or inline function, within a class?
Type: Posts; User: -Syntax
When is it best to use a function prototype or inline function, within a class?
I agree as well. I could simply do this with one class alone using a constructor and destructor without the hassle of using multiple classes and objects. Thanks citizen!
I don't know why, but when I create an ATM object, I get an error when I try to compile the program. Here's what I have so far:
class ATM
{
public:
SavingAccount amount;
};
It's suppose to access the SavingAccount class, from the ATM class, which then stores the 100.00 inside the member function WithDraw. Whenever I run the program it says I have two errors, which are...
If you look back at the original question, it says,"You have to define one class for each object. Each object should contain, as a minimum, the following attributes and member functions." Am I...
I was thinking of using that method, but I thought the "Get" functions were used to get information from the user by input, not return it; I think that's what "Accessors" were for. Could I just...
Hi everyone, it's been a long time since I've been here. I've come along way with C++, but I'm stuck with a problem I can't come to figure out: constructor use.
NOTE: I'm not asking you to do the...
I see what you mean now. What it be best if I just did this for the division section:
absentAverage = static_cast<double>(total_missedDays)/ static_cast<double>(numEmployees); I believe that's...
I'm not sure what you mean by my use of while loops. I used them to make sure the user entered valid information. For example, if they entered invalid data, instead of executing the program over, it...
In my spare time, I'm thinking about learning ActionScript which is used in coding in Macromedia Flash. Does anyone know or use ActionScript?
This is a program I have to do for class and just wanted to get some feedback. Comments and critiques welcomed.
-------------
This program will calculate and display the average number of days a...
Since you say dividing 5.0 and 9.0 is better than 5 and 9, would it be better if I change the function Celsius to double? In example, instead of int Celsius (int), it would be double Celsius (double).
I'm doing a simple code which converts an entered amount of degrees Fahrenheit to Celsius. I'm running sample test data and there appears to be a converting problem.
//This program will convert...