1 Answer
1

You'll need to keep a count of your current depth. I find the best parsers are iterator-based, so that's what I'll show here. std::getline isn't very useful for parsing except with the very simplest of formats.