//include guard, this means that if this file is included more than once
//you wont get multiple definition errors (with classes)
#ifndef FILE_H
#define FILE_H
void func();
#endif
file.cpp
1 2 3 4 5
#include <iostream>
usingnamespace std;
void func(){
cout << it worked!";}
The file being included must be in the same directory (folder) as the file including it. It can also be in a different spot, but unless its in a folder inside the folder with the file including it, using a relative path would be a pain. For files not in your compiler's standard include directory (i.e. YOUR files), you must use quotes for the #include "FILENAME" rather than #include <FILENAME>
Uhm? That would be your IDE. Are you sure that your headers and sources are in the same folder? Are you using quotes (#include "FILENAME") instead of brackets (#include <FILENAME>)? Are you typing the filename correctly? What errors are you getting?
Well, if you are using quotes to include the file (rather than <> brackets), all your files are in the same directory and your spelling all the filenames correctly, then I don't know what is wrong.