跳到主要内容

3 篇博文 含有标签「C++」

Blog posts related to C++

查看所有标签

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

C++ Beginner's Guide: Managing Your Project Using CMake

· 阅读需 7 分钟

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

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