Indenting Program

I'm trying to make a program that indents a code correctly based on detecting {Braces}. The trouble I'm running into is recognizing if there is already a tab in the right place.

So is there a way to read white space from a file and recognize that white space as a tab?
Hmm. I've been working on this and I figured out that I can use getline to retrieve the whole line, white spaces and all, then step through each character. Thanks.
You're welcome.
Is it a sign of insanity if you start posting answers to your own questions, or is that only if you're speaking them out loud?
:^)
Last edited on
Generally, having to phrase your troubles as words in the form of an intelligent question has a tendency to make you rethink the problem and find a solution you would not have found otherwise. It also helps people who search Google.
Topic archived. No new replies allowed.