User forums > Help

Stop Code::Blocks from adding a new line at the end of a .txt file

(1/1)

Krovlar:
I have a program that reads a list of times from a file. Unfortunately Code::Blocks adds an extra line to the bottom of every .txt file. This is causing my program to read it as a 0, which is screwing up the rest of the calculations. Is there a way to stop Code::Blocks from adding that extra line? I have tried deleting it, but as soon as I save it is back.

Thank you.

Alpha:
Settings->Editor...->End-of-line options (box)->End files with blank line
Be warned that this is a global option, so you will need to manually ensure your C/C++ files end in a blank line if you disable it.

Jenna:
Most likely "Settings -> Editor... -> General settings -> Editor settings -> End-of-line options -> End files with blank line" .

Krovlar:
Awesome, thank you both. I always make sure my C++ files end in a blank link, I learned c++ using notepad, which was terrible, but it taught me to be careful.

Thanks again,

Billy

Navigation

[0] Message Index

Go to full version