Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Help
»
Stop Code::Blocks from adding a new line at the end of a .txt file
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Stop Code::Blocks from adding a new line at the end of a .txt file (Read 5239 times)
Krovlar
Single posting newcomer
Posts: 2
Stop Code::Blocks from adding a new line at the end of a .txt file
«
on:
April 28, 2012, 06:24:33 pm »
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.
Logged
Alpha
Developer
Lives here!
Posts: 1513
Re: Stop Code::Blocks from adding a new line at the end of a .txt file
«
Reply #1 on:
April 28, 2012, 06:44:36 pm »
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.
Logged
Jenna
Administrator
Lives here!
Posts: 7255
Re: Stop Code::Blocks from adding a new line at the end of a .txt file
«
Reply #2 on:
April 28, 2012, 06:45:02 pm »
Most likely "Settings -> Editor... -> General settings -> Editor settings -> End-of-line options -> End files with blank line" .
Logged
Krovlar
Single posting newcomer
Posts: 2
Re: Stop Code::Blocks from adding a new line at the end of a .txt file
«
Reply #3 on:
April 28, 2012, 07:19:43 pm »
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
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Help
»
Stop Code::Blocks from adding a new line at the end of a .txt file