1) Borland C++ or Visual C++. I've used Borland before but I might need to do some low-level display work (e.g. plot a graph etc). Is there any performance difference between the two. Which would be easier to handle C++ stuff and also help with a little bit of graphics?
2) I've decided to use a MULTIMAP for a sequence comparision comparision program. The data structures are:
The problem is that the key is not unique. Here're some values in the multimap:Code:struct COORD { int x, y; //for the coordinates char Letter; //for character name }; multimap <COORD, int> Nodes; //the int is the 'key'
x=1,y=2 ; Letter=A ; Key=1
x=3,y=7 ; Letter=A ; Key=4
x=4,y=7 ; Letter=B ; Key=3
x=5,y=8 ; Letter=B ; Key=3
x=6,y=9 ; Letter=C ; Key=3
x=6,y=11; Letter=A ; Key=5
The key is basically (y - x). Now, I want to use an iterator to the MULTIMAP and pick out all keys with the same value (e.g. Key = 3) and then store these values in another multimap. Problem is I don't know the value of the key from before. I just know there will be repititions but I don't know what those values are.
Also, how do I store the entries that I get from the MULTIMAP, given that I don't know how many of each Key I have?
Thanks!
Edit:
Ok, I realize that I could get around this by storing all the keys in a vector while I'm populating the multimap. The problem is I only want to have unique keys in the vector, no repititions. Is there a way where I could simply push something on a vector (or something else) and if the element already exists then it's simply overwritten. I don't want to do comparisions to do the same cause that would add needless computations to my program.