Error C2227

I'm getting this error on this code......
error C2227: left of '->first' must point to class/struct/union/generic type
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
typedef std::basic_string <unsigned char> ustring;
			ustring receivedData(data[i], length);
    		typedef std::map<string, int> MapMime;
			MapMime mymap;
 
			mymap["audio/basic"] = 1;
			mymap["audio/x-aiff"] = 2;
			mymap["audio/x-wav"] = 3;
			mymap["video/mpeg"] = 4;
			mymap["video/mpeg-2"] = 5;
			mymap["video/quicktime"] = 6;

			for (MapMime::const_iterator it = mymap.begin(), itEnd = mymap.end();it != itEnd;++it);
			{
			size_t findPosition = receivedData.find(it->first);
			if (findPosition != string::npos)
				{
				printf("[%c] Have");
				}
			else
				{
				printf("[%c] Have Not");
				}
			}


This is the line...any help is appreciated. Thanks.
size_t findPosition = receivedData.find(it->first);


stray semicolon line 13
Thanks, Now more problems ;)))

error C2664: 'unsigned int std::basic_string<_Elem>::find(const std::basic_string<_Elem> &,unsigned int) const' : cannot convert parameter 1 from 'const std::string' to 'const std::basic_string<_Elem> &'
IntelliSense: no instance of overloaded function "std::basic_string<_Elem, _Traits, _Ax>::find [with _Elem=unsigned char, _Traits=std::char_traits<unsigned char>, _Ax=std::allocator<unsigned char>]" matches the argument list

size_t findPosition = receivedData.find(it->first); The receivedData.find is now the problem.
Topic archived. No new replies allowed.