c++ Checking if a string is an isogram So I'm starting out and doing some code challenges in between book and tutorial learning and was hoping to get some general feedback on code readability and use of comments.

I know it's sometimes hard to understand your own code after you wrote it so my question is - how easy is it to understand this one based on comments?

Do you think I'm missing anything crucial? Any general feedback welcome, thanks.

/*
https://edabit.com/challenge/SEzYX5qtTR4WcZeR3
An isogram is a word that has no repeating letters, consecutive or 
nonconsecutive.Create a function that takes a string and returns
either true or false depending on whether or not it's an "isogram".
Examples
isIsogram("Algorism") ➞ true
isIsogram("PasSword") ➞ false
// Not case sensitive.
isIsogram("Consecutive") ➞ false
*/

#include &lt;iostream&gt;
#include &lt;ctype.h&gt; // to use the toupper function which takes a letter
character and returns the upper case ASCII integer
using namespace std;

int main()
{
    string input_string;
    string output_string;
    bool isogram_check = true; // by default the program assumes that    everything is an isogram and then tries to find repeating letters to assert that it's not an isogram

    cout &lt;&lt; "Enter a string." &lt;&lt; endl;
    cin &gt;&gt; input_string;

    for (int i = 0; i &lt; input_string.length(); i++) // this loop takes the input string and converts it to all upper case letters.
    {
        output_string = output_string + char(toupper(input_string[i])); 
    }

    // cout &lt;&lt; output_string &lt;&lt; endl;
    // the above line is to test the toupper output

    for (int i = 0; i &lt; output_string.length(); i++)       // the first loop decides WHAT to compare to something else, the second loops decides what that SOMETHING ELSE is.
    {
        for (int o = i+1; o &lt; output_string.length(); o++) // this loop takes the character at position i and compares it to the character at i+1 then i+2, etc. by iterating o.
        {                                                  // in the above comment, i+1 = o since we iterated i once right at the beginning.
            if (output_string[i] == output_string[o])      // when the loop finds two of the same character within the string it brakes out of both loops
            {
                isogram_check = false;
                break;
            }
        }

        if (isogram_check == false)
        {
            break;
        }
    }

    if (isogram_check == false)
    {
        cout &lt;&lt; input_string &lt;&lt; " is not an isogram.\n";
    }
    else
    {
        cout &lt;&lt; input_string &lt;&lt; " is an isogram.\n";
    }
}
Avoid using namespace std.

Keep your lines shorter.  Having to constantly scroll back and forth to read lines is unpleasant.  Most of your comments should be on one (or more) lines right before the statement being commented on.  Also, avoid obvious things in comments (like "resets i to use in the next loop.").

Declare variables as close as possible to their first use.

Since isogram_check is a bool, you can test it with !isogram_check instead of isogram_check == false.

With a slight change in algorithm (searching characters before the ith one), your two while loops can be combined into one. Although there are other ways to do this that could be better (for some definition of "better"), your implementation is a quick first pass that works well for short strings (but less well as the strings get longer).