1.) I am about to run to class and work for the day so I wanted to get this up before I left.

2.) I am using code blocks on Windows.

3.) I ma having an issue where either my main.cpp cannot find my header file, or if I change the directory of all files I no longer seem to have the std library because things like cout and endl are not defined.

4.) Does anyone use code blocks that has tips? I am just trying to get a simple program with 2 classes, one inheriting from the other but before I can even really get going this directory stuff is killing me.


have you included iostream?

are you inheriting the header correctly?
#include "header.h"

another thing to keep in mind is your .cpp will inherit everything from your header including the libraries your including

edit: just looked at the screen shot you posted, as long as iostream was included in your header file all should be ok, if not it might need a code blocks specific fix... all else fails get yourself a copy of vs2010 :)

Ok thanks for the help so far, now I have a different probably simple issue.
It cannot find the header files..It cannot find the file or directory..
I have googled around trying to change the scope of where the program looks but to no avail. I really like code blocks but just getting out of the gate is rough. The header by default I read on some other places isn't placed correctly to be looked for?

Problem --- >

Edit: I seemed to have just fixed it temporarily by setting the exact path to the folder, something I was unable to do from the folder browser. ;/

The way I see it, you should not change the dirs, just include the files properly.

The #include <> directive includes files from the compilers include path.
The #include "" directive includes files from the local folder.

I hope this clears things up.