Hello! I'm glad to have finally made an account here, hopefully someone can give me some direction on this little issue i'm having.
I'm using the getline() function to read in some information from a text file. It works flawlessly until i come across a text file that is blank. It doesn't crash the program, but it will fill an array slot up with "nothing" if i'm using the '\n' delimiter. It seems apparent it just starts reading in blank information. My question is this: Is there any function that can return t/f 0/1 if selected file is blank? Or is there some kind of coding trick out there that can do the same thing?
Well, somehow putting myself out there by asking a question resulted in a panicked search. I found the seekg() and tellg() function. For anyone who may ever read this, these hold the key to your destiny.