Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How to add a struct to a U++ container?
How to add a struct to a U++ container? [message #38599] Thu, 27 December 2012 00:21 Go to previous message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
I'm trying something like this:

struct Person {
String n;
int a;

Person(String name, int age) {
n=name; a=age;
}
};

Then I need to add persons like this:

VectorMap<int, Person> m;
m.Add(1, Person("John", 30));

But it gives me compile error. Any ideas?
 
Read Message
Read Message
Previous Topic: Need help with new project
Next Topic: How to add a Bazaar package to my package?
Goto Forum:
  


Current Time: Tue Apr 23 11:39:18 CEST 2024

Total time taken to generate the page: 0.01477 seconds