Hi everyone, I've been taking an intro course to programming. I'm stuck on this problem. The program is supposed to print out whatever from the local file and print it out on the screen and make a copy to another file.
Here's my code. Could you point out where did i go wrong ?
There are functions in the C library header <cctype> that could be beneficial for testing if the character is a digit or alphabetic, as well as reducing the number of checks needed for upper/lower case.
This can bite you if your file was made on a different OS than your program.
the result in a text file for \n is different bytes across different OS. It won't matter for homework, but watch out for this.
My understanding is the C++ runtime correctly deals with whatever line ending your platform is, as long as the file isn't being opened in binary, so doing == '\n' should be safe.