double.h: no such file or directory |
It's not finding your header file.
All your files should be in the same directory. Typically the IDE will create a project folder that is named whatever you named your project.
The .h and .cpp files either go in that folder, or they go in a /src/ folder that's in that folder, or something like that. It depends on the IDE.
But really -- I don't know how you could be screwing this up, it's very simple.
Start over from scratch.
1) Open your IDE
2) Make a new project. if there are options as for what type of project to make, choose "Empty C++ project" or whatever sounds closest to that
3) Once the project is created look around for an "Add new item to project" option in the menus
4) Name the new item "main.cpp" and copy the code I gave your for main.cpp into that file.
5) Repeat steps 3,4 for "double.h" and "double.cpp"
6) Build the project
Even an outdated IDE like Dev-C++ should be able to do this without any trouble. You must be doing something crazy.
EDIT: I just saw computergeek's reply. You can go that route if you'd like, but getting into makefiles will likely just confuse you even more, and dealing with them is totally unnecessary (the whole point of using an IDE is so you don't have to deal with them). I've been coding C++ for over a decade and I never once had to even look at a makefile, nevermind write/modify one.