Thread: Let's Do Something Useful

  1. #1
    Registered User
    Join Date
    Sep 2004

    Question Let's Do Something Useful


    I'm familiar with shell scripting and have just gotten interested in c++ for programming. I've been following sams c++ which is going well and I'm learning a fair bit.

    The problem however is one actually doing something useful. For instance say I want to manipulate the file system and create a file with a date, such as - file-03-09-04.txt (I'm using unix). Or for instance I want to call something such as tar to compress an output file. With a script this is fairly trivial, is it as easy with c++?

    I assume there are various functions available to do various tasks, but how do I find out which functions are available? If I use <iostream> this allows use of std::cin and std::cout - how do I find out which other functions are available? How do I find out which other include files are available?

    Any advice / suggestions that may help are more than welcome.

    Thanks very much.


  2. #2
    SleepWalker tjohnsson's Avatar
    Join Date
    Apr 2004
    maybe here's something what you are looking for...

  3. #3
    Registered User
    Join Date
    Sep 2004
    That looks good. Thanks! I'm going to have a play with that.


  4. #4
    Registered User major_small's Avatar
    Join Date
    May 2003
    and for the first part of your question, yes, that's easy, but not recomended... just use the system call:

    #include <cstdlib>
    int main()
         system("man fsck");
         return 0;
    Join is in our Unofficial Cprog IRC channel
    Channel: #Tech

    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed