[C++] Cannot define string object [SOLVED]

Started by
1 comment, last by hkBattousai 15 years, 10 months ago
My code : main.cpp
#include "Main.h"

int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR szParam, int nFunster)
{
	/*...*/
}

Main.h
/*...*/
#include <string>
using namespace std;
/*...*/
#include "Bitmap.h"
/*...*/

Bitmap.h
/*...*/
string my_str = "my string";
/*...*/

The one-line code in "Bitmap.h" file gives this error : "'string' does not name a type" What should I do to correct this error? My IDE is : wxDev-C++ 6.10.2 [Edited by - Battousai on June 6, 2008 4:40:46 PM]
Advertisement
Required reading.
Quote:Original post by rip-off
Required reading.


Thank you very much. That artical was what indeed I needed to read.
Now my code word all right.
Thank you again.

This topic is closed to new replies.

Advertisement