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 » fills the DropList from VectorMap
fills the DropList from VectorMap [message #36159] Mon, 07 May 2012 22:20 Go to next message
idkfa46 is currently offline  idkfa46
Messages: 155
Registered: December 2011
Experienced Member
Hi all,
how can I fill a DropList from VectorMap ?!

DropList manual speak about this function:
void Add(DropList& list, const VectorMap<Value, Value>& values)
but when i try to use it I receive the following error:
"function does not take 2 arguments"

...
VectorMap<Value, Value> GetMap(DropList const &dl)
{
    VectorMap<Value, Value> res;
    for(int i = 0; i < dl.GetCount(); i++)
        res.Add(dl.GetKey(i), dl.GetValue(i));
	return res;
}

void m::Xmlize(XmlIO &xml)
{
    if(xml.IsLoading())
    {
        VectorMap<Value, Value> v;
        xml("name", v);
        dropList.Clear();
        Add(dropList, v);
    }
    else
    {
...


C:\MyProve\m\main.cpp(34) : error C2660: 'Upp::Ctrl::Add' : function does not take 2 arguments
m: 1 file(s) built in (0:01.80), 1809 msecs / file, duration = 1809 msecs, parallelization 0%
There were errors. (0:01.90)

Line 34 : Add(dropList, v);

Regards,
Matteo
Re: fills the DropList from VectorMap [message #36163 is a reply to message #36159] Tue, 08 May 2012 10:35 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
use

::Add(dropList, v)


instead of

Add(dropList, v)


This one puzzles me anyways....

Max
Re: fills the DropList from VectorMap [message #36165 is a reply to message #36159] Tue, 08 May 2012 11:05 Go to previous message
idkfa46 is currently offline  idkfa46
Messages: 155
Registered: December 2011
Experienced Member
Ty Max, u rock !
Previous Topic: array of function pointer
Next Topic: XML exercise
Goto Forum:
  


Current Time: Fri Apr 19 00:49:47 CEST 2024

Total time taken to generate the page: 0.64931 seconds