跳到主要内容

1 篇博文 含有标签「CS106L」

查看所有标签

C++ Beginner's Guide: Get an Integer from a String Using string stream

· 阅读需 6 分钟

During the CS 106L course, I learned a lot of C++ streams. This document describes how to use basic_stringstream to get an integer from a string.

quote

The basic unit of communication between a program and its environment is a stream. A stream is a channel between a source and destination which allows the source to push formatted data to the destination.

—— CS 106L Course Reader