Must Specify a File System

This is a discussion on Must Specify a File System within the C++ Programming forums, part of the General Programming Boards category; Hello, picked up one of the recommened books C++ Without Fear and ran into a problem with one of the ...

  1. #1
    Registered User Crimxan's Avatar
    Join Date
    Jan 2008
    Location
    Portland, OR
    Posts
    4

    Must Specify a File System

    Hello, picked up one of the recommened books C++ Without Fear and ran into a problem with one of the exercises.

    This is such a basic program I admit to a little embarrassment about asking for your advice as I am sure the solution is simple. None the less I am not finding one... any help is appreicated.

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
    
    // Declare floating-pt variables
        double ctemp, ftemp;
        
    // Prompt and input value of ctemp (Celsius Temp).
    
        cout << "Input a Celcius temperature and press ENTER: ";
        cin >> ctemp;
    
    // Calculate ftemp (Fahrenheit Temp) and output value.
        
        ftemp = (ctemp * 1.8) + 32;
        cout << "Fahrenheit temperature is: " << ftemp;
    
        return 0;
    }
    So, specifically when I compile (btw using the RHIDE compiler that came with the book) it stops on line (4), which is the "int main()" line, when I attempt to run the program it prints "Must specify file system"

    So... I am thinking it is something in the computer settings or something, since the code itself seems correct,(according to the book). mayhaps I overlooked something?

    This PC is running XP pro and I am working this through the MS-DOS command prompt window.

    again thanks for your time...

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    There's nothing wrong with the program.
    I've never heard of that compiler, so the first thing I'd do is get a decent compiler that people actually use, like Visual Studio on Windows or gcc on Linux.
    http://www.microsoft.com/express/

  3. #3
    Registered User Crimxan's Avatar
    Join Date
    Jan 2008
    Location
    Portland, OR
    Posts
    4
    good advice, thanks.

    I thought I was making things easier for myself with sticking to the software provided... wrong! Following your suggestion and used Visual C++ Express, it took me little bit to "get my bearings" in that environment, but finally figured it out well enough to compile and run the program... LO and BEHOLD it worked... well... the heavens didn't open with a chorus of angels but it functioned as designed...LOL.

    Thanks again.

    One thing I will add if there are other noob like myself, using something like visual studios to write such basic programs may seem a bit daunting, since it is designed for much larger projects and all of the 'abilities' it has.

    can anyone suggest a trimmed down c++ compiler that would better for beginners, or should we just "strap in" and dig through the more advanced program editors?
    Last edited by Crimxan; 06-17-2008 at 10:27 PM.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    It would seem to be more a problem with the setup of the IDE (or DJGPP, which is the compiler which comes with RHIDE as I recall).

    Go through the install / setup instructions again to see if there's anything you missed.

    As for modern looking compilers, with the small footprint
    www.codeblocks.org

    It also uses the same compiler as RHIDE (though probably a newer version). Make sure you get the larger of the two packages available the first time, as that includes the compiler and IDE. The smaller one is the IDE only.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,411
    Quote Originally Posted by Crimxan View Post
    One thing I will add if there are other noob like myself, using something like visual studios to write such basic programs may seem a bit daunting, since it is designed for much larger projects and all of the 'abilities' it has.
    There's not much wrong with Visual Studio. It may be for larger projects, but it also works fine with smaller projects.
    If I may ask, what exactly was it that you found daunting?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Another vote for Code::Blocks. Very simple, and gets the job done. (I write Makefiles myself though, so I use it pretty much as a tabbed editor only)

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,411
    In that case, I'll vote for Visual Studio because it gets the job done.
    IDE, compiler and easy-to-use debugger, all in one package.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  2. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  3. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  4. Replies: 4
    Last Post: 10-21-2003, 04:28 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21