|
-
July 1st, 2009, 08:59 PM
#1
Return a STL map
Hi guys,
Suppose I have a map
map<CString,__int64> infoMap;
and its filled by a fn
returnType GetInfo()
{
...
...
...
return infoMap;
}
what should be the return type ?
Thanks a lot.
-
July 1st, 2009, 09:05 PM
#2
Re: Return a STL map
Probably one of the following:
Code:
map<CString,__int64>
//
map<CString,__int64> &
//
const map<CString,__int64> &
hard to say without more information.
-
July 1st, 2009, 09:13 PM
#3
Re: Return a STL map
what more information may I provide you ? Please ask me.
-
July 1st, 2009, 09:40 PM
#4
Re: Return a STL map
I got it to work, thanks anyway !! the 1st one did the trick...
-
July 2nd, 2009, 04:21 AM
#5
Re: Return a STL map
The return value might be Philip recommendations, even CString, __int64 type or any other type that you want to return from your function.
It depends on what are you doing in this function and what you expected to get when you are calling it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|