Skip to main content

3 posts tagged with "C++"

View All Tags

· 6 min read

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

· 7 min read

作为一个 C++ 初学者,在学习基本语法和练习示例代码时,需要频繁使用 g++ ... input.cpp -o output && ./output 类似的命令编译和运行程序。虽然这种方式有助于熟悉 g++,但是对于想要快速测试代码的新手来说,这种方式不够友好。

本文介绍如何利用 CMake 来管理一个 C++ 学习项目,帮助你快速实现编译和运行。