The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 03-10-2008
ramkrix ramkrix is offline
Registered User
  
 

Join Date: Dec 2007
Location: TamilNadu,INDIA
Posts: 52
Once Again thanks for the useful info Shamrock.

let me ask you the last ques from your reply:
while (read(fd, (void *) name, (size_t) 5) == 5)

The "(size_t)5", what does it mean and will it do?Bcoz i read from a book that we need to give the sizeof() operator at the end. Also you are comaparing it to value "==5"? I could not understand here.

The below one is what I coded in my program: read(fd,name,sizeof(name));

Was mine a right one?