Skip to content

Latest commit

 

History

History
1 lines (1 loc) · 402 Bytes

15.10.md

File metadata and controls

1 lines (1 loc) · 402 Bytes

ifstream is inherited from istream. Thus, we can use objects of type ifstream as if they were istream objects. The parameter of read function is a reference to base type istream, the automatic derived-to-base conversion applies when we pass a derived type ifstream to that function. Inside read function, we can use the istream subpart in the ifstream object through the reference.