c - remove newline characters from text file while writing data -


i getting newline character text file while writing content text file using code below

sprintf(str,"godownname,lorrynumber,invoicenumber,cementcompanyname,rcvdprsnname,rcvdprsndsgnation,entityqty,date\0"); write(fd,str,strlen(str)); 

the text writing 2nd row , unwanted newline writing @ 1st row. want text written 1st row. please 1 me remove newline characters or spaces text file

thanks in advance

my guess have function writes in fd before call of function.

besides, writing "\0" @ end of string litteral useless, there's one.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -