ssize_t sendfile - error

This is a discussion on ssize_t sendfile - error within the C Programming forums, part of the General Programming Boards category; #define WorkPATH "a.txt" #define NewWorkPATH "NEWa.txt" int fd,length=0; int fdnew; int size; char read_buffer[80]; char write_buffer[]="dddddddddddddddddddddddddddddddddd"; ssize_t sendfile(NewWorkPATH, WorkPATH, 0, ...

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    58

    Question ssize_t sendfile - error

    #define WorkPATH "a.txt"
    #define NewWorkPATH "NEWa.txt"
    int fd,length=0;
    int fdnew;
    int size;
    char read_buffer[80];
    char write_buffer[]="dddddddddddddddddddddddddddddddddd";

    ssize_t sendfile(NewWorkPATH, WorkPATH, 0, sizeof (read_buffer));

    the error:

    error: expected declaration specifiers or ‘...’ before string constant
    error: expected declaration specifiers or ‘...’ before string constant
    error: expected declaration specifiers or ‘...’ before ‘&’ token
    error: expected declaration specifiers or ‘...’ before ‘sizeof’

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,848
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 02-11-2013, 11:27 AM
  2. c sendfile doesn't works the 2nd time
    By polslinux in forum C Programming
    Replies: 5
    Last Post: 08-08-2012, 05:59 AM
  3. Replies: 4
    Last Post: 07-24-2011, 10:38 PM
  4. Replies: 1
    Last Post: 11-15-2010, 11:14 AM
  5. Replies: 3
    Last Post: 10-02-2007, 10:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21