cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Save () function
Save () function
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 UTC
dhayden
(5798)
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.