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';
Registered users can post here. Sign in or register to post.