Search:
Forum
Beginners
Save () function
[try Beta version]
Not logged in
register
log in
user name:
password:
remember me
forgot your password?
or sign in using:
try again
cancel
forgot your password?
Save () function
Apr 22, 2017 at 10:17am
Apr 22, 2017 at 10:17am UTC
amcclean147
(3)
Hi there, I have received a piece of code I intend to use in a library but can't understand the following save() function.
Class Person
{
private:
char FirstName [40];
char Surname [40];
Int Age;
public:
void Save (ostream & output);
};
void Person::Save (ostream & output)
{
// Functions are in here.
}
If someone could explain what the 2 lines with save do and how, it would be much appreciated.
Thanks.
Apr 22, 2017 at 12:07pm
Apr 22, 2017 at 12:07pm UTC
dhayden
(5799)
The first "Save" line
declares
the save function. That means it tells the compiler how to call the function. The second one
defines
it. That means it actually creates the function and its code.
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs