I'm trying to get a good structure in some code I'm writing but I'm not quite sure about header files. One of the problems I have is: I know I'm not supposed to include namespaces in header files but I don't know where else to put it.
Consider this header:
// deck.h
#pragma once
#include <vector>
#include "card.h"
using namespace std;
typedef vector<card> pile;
class deck{
public:
deck();
~deck();
void shuffle();
card takeCard();
int getSize();
private:
pile cDeck;
};
The code in card.h is the definition of a card struct. Should the typedef even be in the header file? And ifso, how do I avoid using std::vector?
Any tips would be appriciated.