Results 1 to 3 of 3
Hi,
maybe I'm stupid, but i was trying to find on the Google how to do a backspace. In C-program I want to load some TXT-file and delete f.e. last ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-08-2012 #1Just Joined!
- Join Date
- Sep 2012
- Posts
- 2
Backspace
Hi,
maybe I'm stupid, but i was trying to find on the Google how to do a backspace. In C-program I want to load some TXT-file and delete f.e. last 20chars. I tried \b but it didn't work.
Can anyone help me?
- 09-08-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,236
You might start by showing your code so we know how you are trying to accomplish your goals. In any case, the simple (possibly not correct in your case) answer is to move your pointer to the end of the string minus 20 characters, and then insert a NUL ('\0') byte.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-08-2012 #3Just Joined!
- Join Date
- Sep 2012
- Posts
- 2
Iam sorry... I was ucky guy.. My was talking with my friend and he told me try to fseek.. I did this, but I wrote this code fseek ( target , 18 , SEEK_END ); instead of this fseek ( target , 18 , SEEK_END );
So thank you for your time


Reply With Quote
