Problem with g++ in Ubuntu 10.04

This is a discussion on Problem with g++ in Ubuntu 10.04 within the C++ Programming forums, part of the General Programming Boards category; When I type g++ in my shell it replies no input files this makes me think I have g++ installed ...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Location
    pkr
    Posts
    32

    Problem with g++ in Ubuntu 10.04

    When I type g++ in my shell it replies no input files
    this makes me think I have g++ installed but
    when i type g++ example.cpp it displays
    isostream no directory or files found
    cin not recognized or something like these statement comes

    gcc works fine in compiling my C files
    I have also install build essential but too its not working
    Please Help me...

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    The header is called "iostream".

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    6,434
    Possibly your g++/gcc install is misconfigured (eg not everything fully installed).

    Try typing "which g++" to see what is being executed. Use g++ -v to work out what version, etc.
    Right 98% of the time, and don't care about the other 3%.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Post the code of example.cpp.
    bit∙hub [bit-huhb] n. A source and destination for information.

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,671
    I would guess you also need to install the GNU C++ standard library as well.
    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.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    And I believe it's just a typo in the code...

    Read the post!

  7. #7
    Registered User
    Join Date
    Jun 2005
    Posts
    6,434
    Quote Originally Posted by cyberfish View Post
    And I believe it's just a typo in the code...

    Read the post!
    I did. You responded to the typo in your first post, and I saw no need to reiterate that.

    Subsequent posts by Salem and I addressed the symptoms described, as it is possible the typo was in the post rather than in the code.

    Inability to find a C++ standard header can be a symptom of compiler misconfiguration or a missing/misconfigured C++ standard library.
    Right 98% of the time, and don't care about the other 3%.

  8. #8
    Third Eye Babkockdood's Avatar
    Join Date
    Apr 2010
    Posts
    352
    It's not isostream, it's iostream. Your source should compile after you fix your typo.

  9. #9
    Registered User
    Join Date
    Mar 2010
    Location
    pkr
    Posts
    32

    Thanks to all

    Thanks for the solution I was such a dumb not to know that thing but it was my first time in linux and C++ combine

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,931
    That's okay. I have been known to #include <iosteam>.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  2. Problem With Code In Ubuntu ,please Help Me
    By krisvamc in forum C Programming
    Replies: 2
    Last Post: 04-12-2007, 11:55 PM
  3. Problem With Code In Ubuntu ,please Help Me
    By krisvamc in forum Linux Programming
    Replies: 0
    Last Post: 04-12-2007, 05:08 PM

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