Print newline for anything but numbers

How to write an if statement that prints a new line for any line in a file that does not start with a number?
if ( !isdigit( str[0] ) ) cout << '\n';
Topic archived. No new replies allowed.