![]() |
|
#1
|
|||
|
|||
displaying array of pointsHello,
I have a struct which consist of 5 varaibles. CPP / C++ / C Code:
This stuct is stored in a vector. CPP / C++ / C Code:
The vector will store several struct and is indexed by FrameNo. I use an array of point[5], to display the different screen cordinates of those variables, which is declared in myDoc class. CPP / C++ / C Code:
On mouse click, the points are drawn on screen and the struct are updated with the respective cordinates, for each frameNo. Then the struct is push in the vector. CPP / C++ / C Code:
It can happen that not all variable are updated at the same time. so some might not have a value. Now I want to display those variables which have a value (not Zero) as per FrameNo. CPP / C++ / C Code:
And I want to be able to go back to the frame allocate the missing point (ie, the onee with zero value). BUT the problem is that system assumes that all 5 points are allocated even those with the zero values. So I can't update the empty points. How can I control the display of the array of points so that only the index of the ones with values will be counted and so that I can later update the empty ones. Can anyone please, please HELP ! ! ! ! Thanks Last edited by dsmith : 26-May-2004 at 21:50.
Reason: Please use [c] & [/c] for syntax highlighting
|
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Read file and copy to dinamic array | Carlo | C++ Forum | 3 | 10-May-2004 19:28 |
| shorthest path-another way | Pandiani | C++ Forum | 6 | 09-May-2004 19:51 |
| Speed up C++ code about 3d array! | Truong Son | C++ Forum | 0 | 16-Mar-2004 21:52 |
| c: array comparison | jack | C Programming Language | 7 | 26-Jan-2004 11:21 |
| Extra null element in an array | samtediou | MySQL / PHP Forum | 2 | 11-Dec-2003 11:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The