declaring and using a string in a header file

i am tring to declare and use a string in a header file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef DECK_H
#define DECK_H

#include <vector>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>

struct aCard
  {
	  int Suit;
	  int Rank;
  };

class Deck  
{  
public:  
    void initialiseDeck();  
    void displayDeck();  
    void shuffleDeck();   
	void drawCard();
	void getSuit();
	void getRank();
	string suitString;
	std::vector<aCard> Cards;
    Deck();  
    ~Deck(); 

private:
}; 

#endif 


this is my header file so far, however it thows up errors whenever i try to compile moaning about the string line.

Does anyone know why?

Any help is much appreciated =)
Last edited on
It's std::string.
Or you can simpley type "using namespace std;" right after you include all of your files
1
2
3
4
5
6
#include <vector>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
Topic archived. No new replies allowed.