Fundamentals11 / 15
Up next

std::string

#include <print>
#include <string>

int main() {
    std::string first = "Ada";
    std::string last = "Lovelace";
    // std::format builds a new string from the parts
    auto full = std::format("{} {}", first, last);
    std::println("{} has {} chars", full, full.size());
}
What you're solving

own a growable text buffer