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

C / C++ / MFC

 
GeneralRe: MFC CSockets Pin
palbano3-Aug-04 9:39
palbano3-Aug-04 9:39 
QuestionHow to open an specific view? Pin
Ivan Cachicatari3-Aug-04 6:14
Ivan Cachicatari3-Aug-04 6:14 
AnswerRe: How to open an specific view? Pin
Roger Allen3-Aug-04 6:44
Roger Allen3-Aug-04 6:44 
GeneralWeird Irda problem and abnormally increasing HANDLE count... Pin
3-Aug-04 5:25
suss3-Aug-04 5:25 
GeneralRe: Weird Irda problem and abnormally increasing HANDLE count... Pin
Trollslayer3-Aug-04 6:40
mentorTrollslayer3-Aug-04 6:40 
GeneralQuestion Pin
rfixxxer3-Aug-04 5:23
rfixxxer3-Aug-04 5:23 
GeneralRe: Question Pin
jmkhael3-Aug-04 5:39
jmkhael3-Aug-04 5:39 
GeneralRe: Question Pin
Michael P Butler3-Aug-04 5:40
Michael P Butler3-Aug-04 5:40 
GeneralRe: Question Pin
rfixxxer3-Aug-04 6:04
rfixxxer3-Aug-04 6:04 
GeneralRe: Question Pin
David Crow3-Aug-04 5:47
David Crow3-Aug-04 5:47 
GeneralRe: Question Pin
rfixxxer3-Aug-04 6:07
rfixxxer3-Aug-04 6:07 
QuestionTransparent button control over a dialog in WinCE ? Pin
Arun AC3-Aug-04 5:19
Arun AC3-Aug-04 5:19 
GeneralNotification popup Pin
Riderman373-Aug-04 4:37
Riderman373-Aug-04 4:37 
GeneralRe: Notification popup Pin
valikac3-Aug-04 5:48
valikac3-Aug-04 5:48 
GeneralRe: Notification popup Pin
David Crow3-Aug-04 5:51
David Crow3-Aug-04 5:51 
GeneralSending an interrupt to a process Pin
Member 6256663-Aug-04 4:23
Member 6256663-Aug-04 4:23 
GeneralRe: Sending an interrupt to a process Pin
jmkhael3-Aug-04 5:18
jmkhael3-Aug-04 5:18 
GeneralLocating chars in strings etc. Pin
CreepingFeature3-Aug-04 4:16
CreepingFeature3-Aug-04 4:16 
It's a bitch! Mad | :mad:

Anyhow here is the thing I got myself a string, just a word.

I need to locate a char in it and then erase it, also it must be done in a loop so that if char is in there twice etc. it would be deleted.

Problem: What if char doesn't exist in the string.

I tried to use if( !(blahblah.find(char)) ) doesn't work because if .find
doesn't see the char it throws the value of char position out of range of length of string or drops it bellow zero, causes an out of range error.
(This took me half a day to figure out) Mad | :mad:

So I used: if( (blahblah.find(char) < 0) || (blahblah.find(char) => Length) )
same crap!

Two hours later found strpbrk()!

How can I use it together with strlen to simplify the condition and avoid
out of range error during run-time.

Basicaly what I need is to look at a string, single word. Check if it has a char I provide. If it doesn't I need the if-statment to fall thru.
But if it does have it I need to erase it, this I can do Laugh | :laugh: .
GeneralRe: Locating chars in strings etc. Pin
Nigel Savidge3-Aug-04 4:55
Nigel Savidge3-Aug-04 4:55 
GeneralRe: Locating chars in strings etc. Pin
CreepingFeature3-Aug-04 7:08
CreepingFeature3-Aug-04 7:08 
GeneralRe: Locating chars in strings etc. Pin
David Crow3-Aug-04 5:56
David Crow3-Aug-04 5:56 
GeneralCListCtrl - number of icons displayed. Pin
John-Lucas Brown3-Aug-04 3:20
John-Lucas Brown3-Aug-04 3:20 
GeneralRe: CListCtrl - number of icons displayed. Pin
Graham Bradshaw3-Aug-04 8:05
Graham Bradshaw3-Aug-04 8:05 
GeneralOpening any Ext. pacakage in a view port Pin
sangit843-Aug-04 2:50
professionalsangit843-Aug-04 2:50 
GeneralCombo box window text Pin
gokings3-Aug-04 2:40
gokings3-Aug-04 2:40 

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.