Hi, I'm in my first semester of C++, and I'm having trouble with a program.
I need to write a program that reads numbers one by one from a text file, check whether a number is well-ordered or not, and print the number with “well-ordered” if the number is well-ordered, otherwise print the number with “not well-ordered
What exactly do you mean that a number is well ordered? It's digits are ordered, you're receiving them in a way that they're already ordered? I just find it a slightly confusing use of language as any set of numbers is "well ordered" according to the well ordering principle.
By well ordered I mean increasing from left to right, like 368 as opposed to 287.
I've replaced with line 7 with what you suggested, kesk.
Any ideas on what features of <iostream> to use?
Like I said, I'm new to this.
Your current program prints the number only if it is "desirable". Your instructions want a printout for every number and merely different printed text based on "desirability".
You (must) have a compiler. When you do compile a program, the compiler can show warning and error messages. Those messages state the line of code that has an issue. Learn to look at those messages. The first error is usually the most meaningful.
If you see an error that you cannot fix or understand, show it to us with the code.