Find the answer to your Linux question:
Results 1 to 2 of 2
hii, i am trying to simulate an ftp server and client in c on 2 different systems. the client askes for a file ant the server sends it the file. ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    1

    Unhappy variable file name in open system call

    hii,
    i am trying to simulate an ftp server and client in c on 2 different systems. the client askes for a file ant the server sends it the file. the problem here is that if i have to open the file before i can send its content to the client. but to open the file i've to give the file name as a constant string type. but the name was sent by the client and was thus saved in a character array. when i tried to give variable's name in place of the filename, the code doesnt work. how can i overcome this problem??

    plzz anyone reply soon
    thx

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    665
    I would have posted this question in the programming section on the forum. Also, we have no idea what language you're using. Even 2 languages as similar as C and C++ would have 2 totaly different answers.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...