Click here to Skip to main content
15,907,497 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: vector sort method Pin
Luc Pattyn25-Mar-10 10:19
sitebuilderLuc Pattyn25-Mar-10 10:19 
GeneralRe: vector sort method Pin
Maximilien25-Mar-10 10:34
Maximilien25-Mar-10 10:34 
GeneralRe: vector sort method Pin
Luc Pattyn25-Mar-10 10:36
sitebuilderLuc Pattyn25-Mar-10 10:36 
QuestionProgress Meter (MFC) [modified] Pin
Software200725-Mar-10 6:41
Software200725-Mar-10 6:41 
AnswerRe: Progress Meter (MFC) Pin
CPallini25-Mar-10 6:58
mveCPallini25-Mar-10 6:58 
AnswerRe: Progress Meter (MFC) Pin
Ravi Bhavnani25-Mar-10 7:33
professionalRavi Bhavnani25-Mar-10 7:33 
Questionuse of a struct in a pair which is used in a vector of vectors Pin
b-rad31125-Mar-10 5:49
b-rad31125-Mar-10 5:49 
AnswerRe: use of a struct in a pair which is used in a vector of vectors Pin
Graham Breach25-Mar-10 6:38
Graham Breach25-Mar-10 6:38 
push_back is just a member function of the vector class that adds an element to the end of the list - so it needs an argument of the correct type. What you are supplying as an argument is a pair constructor, which takes one of each type as its arguments (not three arguments, which is what the compiler is complaining about in the second message).

The first message is complaining about an undefined type.
struct vectorstruct{
   int x;
   string str;
} mystruct;

- this actually declares a structure with a type name of "vectorstruct" and an instance of this type called "mystruct". You should use "vectorstruct" instead of "struct mystruct" in your vector declaration.

Where you have
vector< pair< vector< long double >,struct mystruct >> vic;

- this is actually a vector of pairs, the pair's first member being a vector of long doubles and the second being a "struct mystruct".

Adding a constructor to the struct would make it easier to write the push_back section of code, and getting rid of the pair altogether would probably make things a lot clearer. You could even move the inner vector into the struct if it really is supposed to go inside the pair.
QuestionCBCGPProp PushChar event not work Pin
MrKBA25-Mar-10 3:37
MrKBA25-Mar-10 3:37 
QuestionRe: CBCGPProp PushChar event not work Pin
CPallini25-Mar-10 3:51
mveCPallini25-Mar-10 3:51 
AnswerRe: CBCGPProp PushChar event not work Pin
MrKBA25-Mar-10 4:05
MrKBA25-Mar-10 4:05 
AnswerRe: CBCGPProp PushChar event not work Pin
tom groezer26-Mar-10 2:47
tom groezer26-Mar-10 2:47 
QuestionRe: CBCGPProp PushChar event not work Pin
CPallini26-Mar-10 2:55
mveCPallini26-Mar-10 2:55 
AnswerRe: CBCGPProp PushChar event not work Pin
Tim Craig26-Mar-10 8:37
Tim Craig26-Mar-10 8:37 
AnswerRe: CBCGPProp PushChar event not work Pin
Eugen Podsypalnikov25-Mar-10 3:52
Eugen Podsypalnikov25-Mar-10 3:52 
GeneralRe: CBCGPProp PushChar event not work Pin
MrKBA25-Mar-10 4:04
MrKBA25-Mar-10 4:04 
GeneralRe: CBCGPProp PushChar event not work Pin
Eugen Podsypalnikov25-Mar-10 4:12
Eugen Podsypalnikov25-Mar-10 4:12 
GeneralRe: CBCGPProp PushChar event not work Pin
MrKBA26-Mar-10 3:53
MrKBA26-Mar-10 3:53 
Questionneed vector of vectors to hold more than just a "pair" Pin
b-rad31125-Mar-10 3:34
b-rad31125-Mar-10 3:34 
AnswerRe: need vector of vectors to hold more than just a "pair" Pin
Chris Losinger25-Mar-10 3:42
professionalChris Losinger25-Mar-10 3:42 
GeneralRe: need vector of vectors to hold more than just a "pair" Pin
b-rad31125-Mar-10 3:45
b-rad31125-Mar-10 3:45 
GeneralRe: need vector of vectors to hold more than just a "pair" Pin
Chris Losinger25-Mar-10 3:58
professionalChris Losinger25-Mar-10 3:58 
GeneralRe: need vector of vectors to hold more than just a "pair" Pin
b-rad31125-Mar-10 4:00
b-rad31125-Mar-10 4:00 
AnswerRe: need vector of vectors to hold more than just a "pair" Pin
Nemanja Trifunovic25-Mar-10 5:43
Nemanja Trifunovic25-Mar-10 5:43 
QuestionCheck for validity of IP address [modified] Pin
krish_kumar25-Mar-10 2:42
krish_kumar25-Mar-10 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.