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 » U++ Library support » U++ Core » Vector< > & does't work
Vector< > & does't work [message #6745] Sun, 26 November 2006 01:58 Go to previous message
Ulti is currently offline  Ulti
Messages: 108
Registered: September 2006
Experienced Member

int cache;
Vector< Item > &Ptr=Ports;
switch(T)
{
case PORT:
{
cache=PortCache;
Ptr=Ports;
}break;
case CHANNEL:
{
cache=ChannelCache;
Ptr=Channels;
}

}
if(cache!=-1)
if(Ptr[cache].selfId==key)return Ptr[cache].item;

for(int i=0;i<Ptr.GetCount();i++)
{
if(Ptr[i].selfId==key)
{
cache=i;
return Ptr[i].item;
}
}
return -1;

doesn't work.
Assertion fail at line:for(int i=0;i<Ptr.GetCount();i++)
I can't figure out why.
 
Read Message
Read Message
Read Message
Previous Topic: How to catch keyboard input?
Next Topic: How to simulate keyboard (and without focus)?
Goto Forum:
  


Current Time: Mon Apr 29 01:28:31 CEST 2024

Total time taken to generate the page: 0.05228 seconds