Initialize nameage.dat with 100 records that store values lastName ="unassigned", firstName = "" and age = 0.
What will be an ideal response?
```
// fstream object "fileObject" corresponds to file nameage.dat
Person blankPerson;
blankPerson.setLastName("unassigned");
blankPerson.setFirstName("");
blankPerson.setAge("0");
blankPerson.id = 0;
for (size_t r{0}; r < 100; r++) {
fileObject.write(reinterpret_cast
sizeof(Person) );
}
```
Computer Science & Information Technology
You might also like to view...
The Mail Merge task pane can be displayed by clicking the Start Mail Merge button
Indicate whether the statement is true or false
Computer Science & Information Technology
Which of the following is an example of a DCE?
A. Router B. Modem C. Hub D. All of the above
Computer Science & Information Technology