Re: typedef Syntax Error
"Mike Copeland" <mrc2323@cox.net> wrote in message
news:MPG.237529dc75782682989730@news.cox.net...
I'm getting a syntax error on the "typedef" code line here. Any
thoughts on why? TIA
struct CSTYPE // City/State Record
{
string csKey;// City/State "Key"
string csCity; // City
string csState; // State Code
};
typedef map<string, CSTYPE> CSINFO; // <= error here
extern CSINFO cityStInfo;
extern map<string, CSTYPE>::iterator csIter;
extern CSTYPE workCS;
1. did you #include <map> and <string>?
2. map and string live in the std:: namespace
3. Would you care to describe the specific error?
I didn't state the error (C2143) because it's compiler-specififc
(VC++ 6.0) and I know that's a no-no here. 8<{{
There is no reason I know of to use VC++ 6.0 when you can download VC++ 8.0
for free from Microsoft which is much better and up to date. See here.
http://www.microsoft.com/express/download/
I also didn't state that this is in a common .h file I'm building
(and I apologize for not mentioning that...)