Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Menu and document Pin
«_Superman_»8-Apr-09 19:07
professional«_Superman_»8-Apr-09 19:07 
Questionprint in splitted window Pin
susanne17-Apr-09 22:35
susanne17-Apr-09 22:35 
Questionhow to set a class member function as parameter of an other class in its constructor ? Pin
pedefetoll7-Apr-09 22:22
pedefetoll7-Apr-09 22:22 
AnswerRe: how to set a class member function as parameter of an other class in its constructor ? Pin
TinyDevices7-Apr-09 22:26
professionalTinyDevices7-Apr-09 22:26 
GeneralRe: how to set a class member function as parameter of an other class in its constructor ? Pin
pedefetoll7-Apr-09 22:40
pedefetoll7-Apr-09 22:40 
AnswerRe: how to set a class member function as parameter of an other class in its constructor ? Pin
Stuart Dootson7-Apr-09 22:34
professionalStuart Dootson7-Apr-09 22:34 
QuestionWriting a similar function as ComboBox SelectString Pin
beko7-Apr-09 21:16
beko7-Apr-09 21:16 
AnswerRe: Writing a similar function as ComboBox SelectString Pin
Stuart Dootson7-Apr-09 21:53
professionalStuart Dootson7-Apr-09 21:53 
Use std::map::lower_bound. For example, the program below gives you a pair of iterators defining the range containing keys starting with 'A':

#include <string>
#include <map>
#include <iostream>

int main(int, char**)
{
   std::map<std::string, int> a;
   a.insert(std::make_pair("Apple", 1));
   a.insert(std::make_pair("Banana", 1));
   a.insert(std::make_pair("Pear", 1));
   a.insert(std::make_pair("Apricot", 1));
   a.insert(std::make_pair("Plum", 1));
   
   std::map<std::string, int>::const_iterator low = a.lower_bound("A");
   std::map<std::string, int>::const_iterator hi = a.lower_bound("B");
   
   for(std::map<std::string, int>::const_iterator it=low;it!=hi;++it)
   {
      std::cout << it->first << std::endl;
   }
}


Note that the sample key for the second lower_bound call is just the key you're looking for with the last character incremented by one.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Writing a similar function as ComboBox SelectString Pin
beko7-Apr-09 22:09
beko7-Apr-09 22:09 
QuestionRe: Writing a similar function as ComboBox SelectString Pin
TinyDevices7-Apr-09 22:23
professionalTinyDevices7-Apr-09 22:23 
AnswerRe: Writing a similar function as ComboBox SelectString Pin
Stuart Dootson7-Apr-09 22:27
professionalStuart Dootson7-Apr-09 22:27 
GeneralRe: Writing a similar function as ComboBox SelectString Pin
TinyDevices7-Apr-09 22:33
professionalTinyDevices7-Apr-09 22:33 
QuestionDLL multy [modified] Pin
denisxfrom7-Apr-09 20:49
denisxfrom7-Apr-09 20:49 
AnswerRe: DLL multy Pin
Stuart Dootson7-Apr-09 21:20
professionalStuart Dootson7-Apr-09 21:20 
Questionhai Pin
roopa.n7-Apr-09 20:39
roopa.n7-Apr-09 20:39 
AnswerRe: hai Pin
TinyDevices7-Apr-09 22:26
professionalTinyDevices7-Apr-09 22:26 
JokeRe: hai Pin
Nelek8-Apr-09 0:30
protectorNelek8-Apr-09 0:30 
AnswerRe: hai Pin
0x3c08-Apr-09 1:32
0x3c08-Apr-09 1:32 
Questionhai Pin
roopa.n7-Apr-09 20:38
roopa.n7-Apr-09 20:38 
AnswerRe: hai Pin
Cedric Moonen7-Apr-09 21:01
Cedric Moonen7-Apr-09 21:01 
AnswerRe: hai Pin
Rajesh R Subramanian7-Apr-09 22:31
professionalRajesh R Subramanian7-Apr-09 22:31 
QuestionAddScanPackageService is retruning E_INVALIDARG Pin
ashish8patil7-Apr-09 20:29
ashish8patil7-Apr-09 20:29 
AnswerRe: AddScanPackageService is retruning E_INVALIDARG Pin
Stuart Dootson7-Apr-09 21:30
professionalStuart Dootson7-Apr-09 21:30 
GeneralRe: AddScanPackageService is retruning E_INVALIDARG Pin
ashish8patil7-Apr-09 21:44
ashish8patil7-Apr-09 21:44 
QuestionDatabase Server \Client model Pin
krishnan.s7-Apr-09 19:41
krishnan.s7-Apr-09 19:41 

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.