0

Hello guys I m trying to code a program to fix indented code but problem is that i will use strstr to search for the for string then i ill read it till it encounted \0 then i wanna jump to next line to add 4 spaces before the code is there a way i can jump to next line ?

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by lolguy
0

yah but how can i ? like for example i ill read for line this
for(i=0;buffer!=0;i++); but that will only read current line i wanna jump to next one like read the for then at end of the after it reached 0 i want to jump to next line to add 4 spaces

0

like lets say for example this code
for(CODE)
codeishere

it will move it
to
for(code)
codeishere

0

When you finish reading a line, you are automatically ready to read the next line. So just start reading again and there you are!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.