Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: how to do colour image quantization using VC++ Pin
Hamid_RT26-Jun-07 19:13
Hamid_RT26-Jun-07 19:13 
Questionhelp with a lil short piece of code Pin
andyspartyshop26-Jun-07 14:28
andyspartyshop26-Jun-07 14:28 
while(getline(passage,nextword,'\n'))
{
int status = 0;
transform(nextword.begin(), nextword.end(), nextword.begin(), (int(*)(int))std::toupper);
int x=nextword.find(test1);
int y=nextword.find(test2);
int z=nextword.find(test3);
if(x!=std::string::npos)
{
status = 1;
}
if(y!=std::string::npos|| z!=std::string::npos)
{
status = 2;
}
string nextword;
ostringstream os(nextword);
string readInWord;
while (os>>readInWord)
{
if (status==0)
++wordCount[readInWord];
else if (status==1)
{
++wordCount[readInWord];
++single[readInWord];
}
else if (status==2)
{
++wordCount[readInWord];
++single[readInWord];
++compound[readInWord];
}

}
}



I am trying hard to get this code to work but seems to be something wrong. I am testing for 3 things and if present I am trying to update certain maps accordingly. I am getting some sort of error on the ostringstream os(nextword) not sure what this is or what it does. Someone put it in my code saying this would fix my problem but I have yet to figure it out.
AnswerRe: help with a lil short piece of code Pin
Christian Graus26-Jun-07 14:59
protectorChristian Graus26-Jun-07 14:59 
QuestionHow to Convert LPTSTR to string class in VC++ Pin
Jahnson K26-Jun-07 12:57
Jahnson K26-Jun-07 12:57 
AnswerRe: How to Convert LPTSTR to string class in VC++ Pin
Mark Salsbery26-Jun-07 13:29
Mark Salsbery26-Jun-07 13:29 
GeneralRe: How to Convert LPTSTR to string class in VC++ Pin
Arman S.26-Jun-07 19:28
Arman S.26-Jun-07 19:28 
GeneralRe: How to Convert LPTSTR to string class in VC++ Pin
Mark Salsbery27-Jun-07 4:47
Mark Salsbery27-Jun-07 4:47 
GeneralRe: How to Convert LPTSTR to string class in VC++ Pin
Jahnson K27-Jun-07 10:41
Jahnson K27-Jun-07 10:41 
GeneralRe: How to Convert LPTSTR to string class in VC++ Pin
Mark Salsbery27-Jun-07 11:30
Mark Salsbery27-Jun-07 11:30 
GeneralRe: How to Convert LPTSTR to string class in VC++ Pin
Jahnson K6-Jul-07 12:25
Jahnson K6-Jul-07 12:25 
GeneralRe: How to Convert LPTSTR to string class in VC++ Pin
Mark Salsbery6-Jul-07 13:35
Mark Salsbery6-Jul-07 13:35 
AnswerRe: How to Convert LPTSTR to string class in VC++ Pin
awah26-Jun-07 16:38
awah26-Jun-07 16:38 
QuestionUSB Stuff Pin
Akin Ocal26-Jun-07 12:39
Akin Ocal26-Jun-07 12:39 
AnswerRe: USB Stuff Pin
Christian Graus26-Jun-07 13:34
protectorChristian Graus26-Jun-07 13:34 
QuestionCrypto++ Help Pin
ErnestoNet26-Jun-07 10:52
ErnestoNet26-Jun-07 10:52 
AnswerRe: Crypto++ Help Pin
led mike26-Jun-07 12:18
led mike26-Jun-07 12:18 
AnswerRe: Crypto++ Help Pin
Mark Salsbery27-Jun-07 6:49
Mark Salsbery27-Jun-07 6:49 
QuestionWindows message vs connection points Pin
Rose8126-Jun-07 10:22
Rose8126-Jun-07 10:22 
AnswerRe: Windows message vs connection points Pin
led mike26-Jun-07 12:20
led mike26-Jun-07 12:20 
AnswerRe: Windows message vs connection points Pin
Roger Stoltz26-Jun-07 21:56
Roger Stoltz26-Jun-07 21:56 
QuestionCommon Controls Problem in XP but not in 2003 [modified] Pin
anselmo26-Jun-07 8:39
anselmo26-Jun-07 8:39 
AnswerRe: Common Controls Problem in XP but not in 2003 Pin
Mark Salsbery26-Jun-07 9:16
Mark Salsbery26-Jun-07 9:16 
GeneralRe: Common Controls Problem in XP but not in 2003 Pin
anselmo26-Jun-07 9:38
anselmo26-Jun-07 9:38 
GeneralRe: Common Controls Problem in XP but not in 2003 Pin
Mark Salsbery26-Jun-07 9:42
Mark Salsbery26-Jun-07 9:42 
GeneralRe: Common Controls Problem in XP but not in 2003 Pin
anselmo26-Jun-07 10:03
anselmo26-Jun-07 10:03 

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.