Thread: file transfer

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    3

    Question file transfer

    sorry i'm very new. can someone pls explain the parameters for writefile, readfile & createfile. i need to work on a file transfer program. thank u.

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    Are you asking how to open and read a file, open and write a file, and create a file in C++?

    Use the ifstream class to read from files. (#include <fstream.h>)
    ex.

    Code:
    ifstream fin("filename.txt");
    fin.write(stuffToWrite, 100, '\n');
    fin.close();
    Use the ofstream class to read from files. (#include <fstream.h>)
    ex.

    Code:
    ofstream fout("filename.txt");
    fout.getline(variableToHoldStuff, 100, '\n');
    fout.close();

    check http://www.cprogramming.com/tutorial/lesson10.html for a much better description of all this. I may have misread your question.. if this is the case just ignore me, and hopefully someone else will help you

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    this belongs in the windows forum.

    if you want info on these functions how about you try MSDN online?? or even Google??

    type the name of these functions into just about ANY search engine and you'll get a million sites that will tell you what you want to know.

    don't be so lazy next time, use the web, that's what it's there for!
    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    3
    thanks 4 the info

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    206
    Originally posted by Uraldor
    this belongs in the windows forum.

    if you want info on these functions how about you try MSDN online?? or even Google??
    I thought this was a site that helps eachother with problems on c++, this includes commands, syntax, ETC...

    don't be so lazy next time, use the web, that's what it's there for!
    U.
    if you dont call this the web what do you call it?

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    yeah uraldor why u being so ****ing negative?

    and what makes u think this belongs to the windows forum?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  3. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM