Thread: Noobs reading "Jumping into C++" - Practice Problems discussion

  1. #16
    Registered User
    Join Date
    Mar 2013
    Location
    Roswell, Georgia, United States
    Posts
    2
    Ive found when i open up a brand new project, the main area of the screen where I would be typing code is completely blank. From there I have two options I know of:
    1) go to the management tab on the side, and under projects open up the file "main.cpp" which opens up a "Hello World" program. I could delete that and then write whatever I want every time I want to program anything.
    2) I go to File->New->empty file which gives me a blank slate, but when I try to "#include <iostream>" it tells me "fatal error: iostream: no such file or directory"

    is there any way for me to open any new projects without this happening?
    even better, is there another, simpler c++ program i can use instead? Im using Code::Blocks because the "Jump into C++" book suggested it but I dont think the usefulness of the book is dependent on whether or not I use Code::Blocks...

  2. #17
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    "fatal error: iostream: no such file or directory"
    Use a new file with the extension cpp instead of c.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #18
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Wilave View Post
    I go to File->New->empty file which gives me a blank slate, but when I try to "#include <iostream>" it tells me "fatal error: iostream: no such file or directory"
    when you created your project, you may have selected C instead of C++ by mistake.

    Quote Originally Posted by Wilave View Post
    even better, is there another, simpler c++ program i can use instead? Im using Code::Blocks because the "Jump into C++" book suggested it but I dont think the usefulness of the book is dependent on whether or not I use Code::Blocks...
    you are correct. the book should remain useful even with a different IDE (integrated development environment). there are several good ones. Eclipse, Netbeans, and Visual C++ Express are but a few. it is unlikely that you will find any of those simpler than Code::Blocks.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I find Eclipse so horrible and so buggy...
    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. "uniqe" practice for 8 qeens problem
    By megazord in forum C Programming
    Replies: 21
    Last Post: 11-21-2009, 01:23 PM
  2. "itoa"-"_itoa" , "inp"-"_inp", Why some functions have "
    By L.O.K. in forum Windows Programming
    Replies: 5
    Last Post: 12-08-2002, 08:25 AM
  3. "CWnd"-"HWnd","CBitmap"-"HBitmap"...., What is mean by "
    By L.O.K. in forum Windows Programming
    Replies: 2
    Last Post: 12-04-2002, 07:59 AM
  4. fopen("FILE_IN.TXT", "r") problems
    By BillD in forum C Programming
    Replies: 2
    Last Post: 05-21-2002, 03:07 PM
  5. Replies: 32
    Last Post: 03-20-2002, 01:21 AM

Tags for this Thread