Click here to Skip to main content
15,898,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting error while using sta::map<std::string,std::string> as return type of method . I wanted to use this method in outside so that declared as public .
Can please give me solution .
Posted

Given the error message, I guess that your code is C++/CLI code in mixed mode. In such case, any public functions in a managed type must use managed types.

You have to figure out how to separate managed code from unmanaged code. The way to do it depends on the problem and which code is managed and which code is native.

By the way for better answer, you should provide more information. The best solution depends on many factor such as how much native and managed code you have and if you expect native or managed callers or both. Also does the implementation have to be native or managed or either would works.
 
Share this answer
 
Thank you very much.

I was using std::map for return value but now I am using Platform String . Now, I am not getting error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900