Friends can i return a list or a map from a function???
sangham
0
Newbie Poster
Recommended Answers
Jump to PostFriends can i return a list or a map from a function???
Why don't you just try it?
map<int, string> Foo(void) { map<int, string> Bar; return Bar; } int main() { map<int, string> mp = Foo(); return 0; }
Works? Question answered :)
All 3 Replies
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
sangham
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
iamthwee
commented:
agreed
+15
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.