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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Please help me make this better
Re: Please help me make this better [message #8561 is a reply to message #8560] Sat, 17 March 2007 20:14 Go to previous messageGo to previous message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
void Sats3::DoDrops() {

  static const ...FromType.. _from[] = {Generation, EdCode, Sex, Race, ..., Area};
  static const ...ControlTypePtr... _ctrl[] = {ist.dGen, ist.dEdCode, ..., mis.txtOpsArea};
//all controls must be derived from the same "..ControlType..."
//and implement virtual "Add" function with same interface

    for (int i = 0; i < sizeof(_from)/sizeof(...FromType..); ++i )
    {
	SQL*Select(Code).From(_from[i]);
	while(SQL.Fetch())
		_ctrl[i]->Add(SQL[0]);
    }

}


Something like this is possible with your current classes/types of variables?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Scribble examples compiling and other errors
Next Topic: Using dual-screen
Goto Forum:
  


Current Time: Tue May 07 21:37:26 CEST 2024

Total time taken to generate the page: 0.02004 seconds