How to include header files

Viewed 90751

Does it matter how I import header files? I've seen double quotes as well as arrows used.

#include <stdlib.h>
#include "Some_Header.h"

Does it matter if they're capitalized a certain way as well? Experimenting around with this, it seems neither matters, but I figure there must be a reason for tutorials doing it the way they do.

Another question is, (coming from Java here), how do I access a class outside the file it was defined in? Say, I have one.cpp and two.cpp.

In one.cpp:

class Something {
    ...

In two.cpp:

class SomethingElse {
    Something *example;
    ...

Like that? In Java you'd just preface a class name with "public." In C++, wrangling classes seems to be a bit more difficult..

5 Answers
Related