|
-
December 7th, 2011, 04:36 PM
#9
Re: adding to vector of vector<int>, check if element already present
What I need to remove is an entire vector from a vector<vector<int>>. I guess this could be thought of as a single element of the vector<vector<int>>.
for example, where
new_set_of_paths.size() = 2
new_set_of_paths[0][17, 19, 21]
new_set_of_paths[1][17, 19, 20]
current_neighbor = 21;
I am checking current_neighbor against the values in new_set_of_paths[0] and new_set_of_paths[1]. If 21 is found in either vector, than that vector needs to be removed,
new_set_of_paths.size() = 1
new_set_of_paths[0][17, 19, 20]
new_set_of_paths[1] needs to be deleted and new_set_of_paths needs to be renumbered, etc.
I think this is the last thing I need to do to get the code working in the general sense. I will post it once I get that far. If you would like to see more at this point, let me know.
LMHmedchem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|