Click here to Skip to main content
15,917,321 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strange compilation errors Pin
moredip3-Jun-02 6:29
moredip3-Jun-02 6:29 
GeneralRe: Strange compilation errors Pin
Joaquín M López Muñoz3-Jun-02 6:29
Joaquín M López Muñoz3-Jun-02 6:29 
GeneralRe: Strange compilation errors Pin
moredip3-Jun-02 6:34
moredip3-Jun-02 6:34 
GeneralRe: Strange compilation errors Pin
Joaquín M López Muñoz3-Jun-02 6:35
Joaquín M López Muñoz3-Jun-02 6:35 
GeneralRe: Strange compilation errors Pin
moredip3-Jun-02 6:44
moredip3-Jun-02 6:44 
GeneralRe: Strange compilation errors Pin
Joaquín M López Muñoz3-Jun-02 6:47
Joaquín M López Muñoz3-Jun-02 6:47 
GeneralHandle to the window Pin
Mazdak3-Jun-02 5:36
Mazdak3-Jun-02 5:36 
GeneralString Manipulation Problem Pin
Sidney3-Jun-02 5:28
Sidney3-Jun-02 5:28 
Hi everyone,

I know this will not be a tough one for you guys... I'm doing a Win32 Application I was trying to extract a string on a string but String.H is limitted I need more advance parsing like MID Function, I cant use CString.H since my project is notMFC, is there another way around that I can extract a string from a string by specifying the offsets and the length? I tried to use this code:

lpAlpha1 = DynamicData; //Just showing to you that I search a dynamic string....

StartPos = 0;
EndPos = 0;
strLen = strlen(lpAlpha1);
while (StartPos < strLen){
EndPos = strcspn(lpAlpha1," "); //Problem
for(i=StartPos,j=0;i<=EndPos;i++,i,j++){
searchStr[j] = lpAlpha1[i];
}
searchStr[j]='\0';
....Search the searchstring in the database..
StartPos = EndPos;
}
cout << searchStr;

But this code post a problem on the strcspn function since I can's specify which offset should it start looking for the space to get the next word on the string.

I hope you understand my explanation, Please help me on this one.

Thanks/Regards
Sidney


Thanks/Regards
Sidney
GeneralRe: String Manipulation Problem Pin
Joaquín M López Muñoz3-Jun-02 6:33
Joaquín M López Muñoz3-Jun-02 6:33 
GeneralRe: String Manipulation Problem Pin
Sidney3-Jun-02 7:30
Sidney3-Jun-02 7:30 
GeneralRe: String Manipulation Problem Pin
Joaquín M López Muñoz3-Jun-02 7:57
Joaquín M López Muñoz3-Jun-02 7:57 
GeneralRe: String Manipulation Problem Pin
Bill Wilson3-Jun-02 6:33
Bill Wilson3-Jun-02 6:33 
GeneralRe: String Manipulation Problem Pin
Alexandru Savescu3-Jun-02 9:15
Alexandru Savescu3-Jun-02 9:15 
GeneralRe: String Manipulation Problem Pin
Michael Dunn3-Jun-02 18:39
sitebuilderMichael Dunn3-Jun-02 18:39 
QuestionLoad from resource instead from a file? Pin
3-Jun-02 5:25
suss3-Jun-02 5:25 
AnswerRe: Load from resource instead from a file? Pin
Chris Losinger3-Jun-02 5:24
professionalChris Losinger3-Jun-02 5:24 
GeneralRe: Thx Pin
3-Jun-02 5:45
suss3-Jun-02 5:45 
QuestionHow do i use the IShellFolder->ParseDisplayName correctly? Pin
redeemer3-Jun-02 5:26
redeemer3-Jun-02 5:26 
GeneralPrime numbers... Pin
Matt Gullett3-Jun-02 5:05
Matt Gullett3-Jun-02 5:05 
GeneralRe: Prime numbers... Pin
Rama Krishna Vavilala3-Jun-02 5:14
Rama Krishna Vavilala3-Jun-02 5:14 
GeneralRe: Prime numbers... Pin
Matt Gullett3-Jun-02 5:17
Matt Gullett3-Jun-02 5:17 
GeneralRe: Prime numbers... Pin
Rama Krishna Vavilala3-Jun-02 5:23
Rama Krishna Vavilala3-Jun-02 5:23 
GeneralRe: Prime numbers... Pin
Matt Gullett3-Jun-02 5:36
Matt Gullett3-Jun-02 5:36 
GeneralRe: Prime numbers... Pin
Tomasz Sowinski3-Jun-02 6:15
Tomasz Sowinski3-Jun-02 6:15 
GeneralRe: Prime numbers... Pin
Matt Gullett3-Jun-02 6:13
Matt Gullett3-Jun-02 6:13 

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.