O'Reilly logo

C++ All-in-One For Dummies, 3rd Edition by John Paul Mueller, Jeff Cogswell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1

Filing Information with the Streams Library

In This Chapter

arrow Seeing the need for a streams library

arrow Using the right header files

arrow Opening a file

arrow Dealing with errors

arrow Working with flags to customize your file opening

First things first. We’ve all heard of rivers and lakes and streams, and it’s interesting just how many common words are used in computer programming. That’s handy, because it lets us use words we already know with similar meaning, but it’s also a bummer because it’s harder to impress strangers. While we don’t have gluggerbumbles and plickershops in computer programming — words most people have never even heard of, mainly because we made them up — we do have streams!

Most programmers think of a stream as the same thing as a file. You know — a file that’s stored on your hard drive or maybe on a Universal Serial Bus (USB) flash drive or Secure Digital (SD) card. But streams go beyond just files. A stream is any type of data structure that you stream (that is, flow) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required