Header (.h) and CPP .(cpp) Help

h1.cpp
using namespace std;
#include "h1.h"
main()
{
}

h1.h
#include "h2.cpp"

h2.cpp
main()
{
}

problem
in the second .cpp (h2.cpp) it will not let me use namespace std even if i add using namespace std; and forced to use std::
Based on the above, this is what h1.cpp looks like when the compiler gets it:

1
2
3
4
5
6
7
8
using namespace std;
main()
{
}

main()
{
}


See any problems?
The compilers probably complaining that main isn't defined or something like that.
you haven't declared what 'main' is.

this might sort out some problems.
Zone, what is the actual error message?
Topic archived. No new replies allowed.