I have my header file which look like this
#ifndef NORMALCLIENT_H
#define NORMALCLIENT_H
#include <ClientType.h>
class NormalClient : public ClientType {
public:
NormalClient();
NormalClient(const NormalClient& orig);
double getDiscount();
int getMaxRents();
virtual ~NormalClient();
private:
};
#endif /* NORMALCLIENT_H */
And source file:
#include "NormalClient.h"
NormalClient::NormalClient() {
}
NormalClient::NormalClient(const NormalClient& orig) {
}
NormalClient::~NormalClient() {
}
Is there a way of not repeating NormalClient::
in source files?
I tried:
#include "NormalClient.h"
using namespace NormalClient
NormalClient() {
}
NormalClient(const NormalClient& orig) {
}
~NormalClient() {
}
But it gives me errors during compilation:
/home/grayrattus/projekt/trunk/trunk/biblioteka/src/model/client_types/NormalClient.cpp:3:17: error: ‘NormalClient’ is not a namespace-name
using namespace NormalClient
^
/home/grayrattus/projekt/trunk/trunk/biblioteka/src/model/client_types/NormalClient.cpp:5:1: error: expected namespace-name before ‘NormalClient’
NormalClient() {
^
I don't understand why compiler gives errors of namespace when I define it before.
Question: Is there a way of not repeating namespaces in source files?