User Profile

Collapse

Profile Sidebar

Collapse
Bruce Mac
Bruce Mac
Last Activity: Apr 2 '07, 02:53 PM
Joined: Mar 31 '07
Location: capetown SA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Bruce Mac
    replied to setting file attribute
    in C
    hi, not sure if this will help but it tried it and it worked for me.

    cout<< system("attrib c:/test.txt") << endl;

    assuming that you have a file called test.txt in the root of your c drive.
    also to modify the attributes open a dos window and type 'attrib /?' with out quotes and it will give you the switches to modify the attributes.

    Bruce
    See more | Go to post

    Leave a comment:


  • Bruce Mac
    started a topic file name issue.
    in C

    file name issue.

    Hi guys.

    i was wondering, is there a way to open a stream to an unknown file or files.
    for eg. i normally use,

    ifstream in("some directory/only_this_file. txt");
    // do something to the input
    in.close();

    ofstream out ("another dirctory/only_that_file. txt");
    //write to file
    out.close();

    but say i wanted to do that to a whole directory of...
    See more | Go to post

  • Bruce Mac
    replied to why does copy not work?
    in C
    Thank you.

    sorted...
    See more | Go to post

    Leave a comment:


  • Bruce Mac
    started a topic why does copy not work?
    in C

    why does copy not work?

    Hi all to all.

    first post here on the scripts

    Maybe someone could explain this to me, why is it that if i open two streams

    ifstream in ("some_doc.txt" );
    ofstream out ("copy_of_some_ doc.txt")

    to 2 txt documents and use

    string lines;
    while(getline, in) {
    in>> line;
    out<< line << endl;
    }
    in.close();...
    See more | Go to post
No activity results to display
Show More
Working...