The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to replace any char with newline char. mightysam Shell Programming and Scripting 5 09-18-2008 05:15 PM
char c = 882 useless79 High Level Programming 1 07-30-2007 02:16 AM
char *p and char p[]. arunviswanath High Level Programming 4 07-19-2006 11:11 PM
Regarding char Pointer sweta High Level Programming 2 06-03-2006 09:09 PM
Convert Char to Dec using AWK jasmine05 Shell Programming and Scripting 4 06-09-2005 12:50 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 05-05-2005
Registered User
 

Join Date: Apr 2005
Location: Australia
Posts: 30
\n char in C

how can i change line in the file while using
write(desc,&c,sizeof(char));

?
Reply With Quote
Forum Sponsor
  #2  
Old 05-05-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,269
You have to set
Code:
c='\n';
I would consider using a higher level call like fprintf() which is easier to use, especially since you seem to be writing single characters to the output stream.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0