Thread: copying a file using c++

  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    3

    copying a file using c++

    i am creating a mailer using c++ which is similar to gmail. i am now struck by an obstacle.
    i need to copy a text file into another one using c++ commands only .
    so pls tell me how to do that

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    well look up basic file io, you need to show some effort of your own before anybody is going to help you with such a bone question- where is your present code? or what are you stuck on?
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  3. #3
    Registered User
    Join Date
    Dec 2011
    Posts
    3
    i am able to deliver the msgs sent properly to the respective person but the problem is that i am not able to save a copy in the sent items of the user who sends it

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Then you will need to correct the error in line 156.









    ... or maybe you need to post some code, we are programmers, not mind readers.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Creating an SMTP client, but can't copy a file from one directory to another. Smells like a copy-paste programmer to me.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I only got as far as "mailer" before I thought "spammer".
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. copying a mp3 file
    By shubham in forum C Programming
    Replies: 37
    Last Post: 06-01-2011, 07:34 AM
  2. File Copying
    By parnaby in forum C++ Programming
    Replies: 4
    Last Post: 01-16-2006, 01:58 PM
  3. copying a file
    By dsingletary in forum C Programming
    Replies: 10
    Last Post: 10-26-2003, 12:45 AM
  4. Copying a file
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 03-06-2002, 12:46 PM
  5. copying a file
    By Unregistered in forum C Programming
    Replies: 9
    Last Post: 01-10-2002, 09:43 AM