Is there an easy way to make an istream or child class that reads from a buffer in memory? I've mostly just used std::ifstream and read from files, but want to be able to read data from a memory buffer in the same way (e.g. I want to be able to use std::getline).
I know I could make a child class (most likely of streambuf) and implement all the functions, but some part of me thinks there's a much easier way that I am just not seeing.