I am learning C ++ at the moment, C ++ Primer plus. But I just wanted to check the cplusplus website and skip the file processing a bit.
I pretty much know the basics of file processing coming from java, php, visual basic. But I came across a rather strange line.
ostream os(&fb);
fb represents the file. I just don't get the syntax for this, but I can understand that it is the same as:
ostream os = &fb;
But I never read about this way of initializing variables.
So I'm interested. Am I just pointless and lose sight of a real useful feature all the time? Is this initialization method only old? Is it something else?
Thanks in advance.
source
share