|
From: Per W. <pw...@ia...> - 2006-06-27 01:37:41
|
First of all, you have forgotten that map and string resides in the std::
namespace.
Besides - do you really want to return a _copy_ of a map?
The following code allocates a map and returns a pointer to the map
object:
#include <map>
#include <string>
std::map<std::string,std::string>* fnk() {
return new std::map<std::string,std::string>;
}
/Per W
On Mon, 26 Jun 2006, Erik Schmidt wrote:
> I'm trying to write a function with a return type of map <string,string>
>
> my declaration looks like this:
>
> #include <map>
>
> map <string,string> get_degenerate{
>
> //do stuff
>
> }
>
> my compiler says I need a constuctor, destructor, or type conversion
> before operator "<"
>
> any help?
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|