Thread: Let's Do Something Useful

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    4

    Question Let's Do Something Useful

    Hi,

    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.

    Gir.

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

    http://www.cplusplus.com/ref/

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

    Gir.

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

    Code:
    #include <cstdlib>
    
    int main()
    {
         system("man fsck");
         return 0;
    }
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    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