I have one problem with namespases. It says "Multiple definition of phys1::x", why? Take a look at my code:
main.cpp
#include <cstdlib>
#include <iostream>
#include "abcd.h"
using namespace phys1;
using namespace std;
int main(){
cout << "SD " << tits() << endl;
system("pause");
return 0;
}
abcd.h
#ifndef _ABCD_H_
#define _ABCD_H_
namespace phys1
{
double xx = 9.36;
}
double tits();
#endif
abcd.cpp
#include "abcd.h"
double tits(){
return phys1::xx;
}