![]() |
| ||
| map<string,string> error I need help with inserting a string for both key and value to a map.
error: error: conversion from `std::_Rb_tree_iterator<std::pair<const std::string, std::string> >' to non-scalar type `std::_Rb_tree_iterator<std::pair<const std::string, int> >' requested can you please help me with this. thanks drjay |
| ||
| Re: map<string,string> error As written there is nothing wrong with this (except I think that you would benefit from a typedef. e.g. typedef std::map<std::string,int> mTYPE; However, I would guess that you have swapped the declarations of fileMap and freqMap. It that is not the problem, please make a short test program and post that. |
| ||
| Re: map<string,string> error there are two maps. _fileMap<string,string> and the other is _freqMap<string, int> _freqMap works fine but _fileMap doesn't. I don't think typedef will work here. I'll try it though. |
| ||
| Re: map<string,string> error i figured it out! thanks! |
| All times are GMT -4. The time now is 3:05 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC