I'm still learning C++ and there are things that I don't understand about header file...
1. I have 3 files.(main.cpp, Foo.h, Foo.cpp)
and this is how I compile with g++ command prompt.
g++ main.cpp Foo.cpp -o something.exe
How is this working? why do I not put header file?
How does C++ compiling work?
I heard about object file. What is it and how do I make one?
2.
1 2 3 4
|
#ifndef FOO_H
#define FOO_H
#endif
|
Can you explain what these stuffs do?
3. I heard that if you include your header file like this,
#include "thingie.h"
it will look at my project folder. Is it true?