Click here to Skip to main content
15,899,124 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting values from CDateTimeCtrl Pin
ensger12-Jun-06 1:18
ensger12-Jun-06 1:18 
AnswerRe: Getting values from CDateTimeCtrl Pin
David Crow12-Jun-06 3:24
David Crow12-Jun-06 3:24 
GeneralRe: Getting values from CDateTimeCtrl Pin
ensger12-Jun-06 4:17
ensger12-Jun-06 4:17 
QuestionAtl Object Pin
hmklakmal11-Jun-06 7:31
hmklakmal11-Jun-06 7:31 
AnswerRe: Atl Object Pin
bob1697211-Jun-06 8:37
bob1697211-Jun-06 8:37 
GeneralRe: Atl Object Pin
hmklakmal11-Jun-06 10:04
hmklakmal11-Jun-06 10:04 
GeneralRe: Atl Object Pin
bob1697211-Jun-06 11:34
bob1697211-Jun-06 11:34 
QuestionVisual C++ Task list Pin
Giles11-Jun-06 7:25
Giles11-Jun-06 7:25 
QuestionMenu Bitmaps from Minimal Source Code in Dialog Pin
Igor Mihailov11-Jun-06 7:25
Igor Mihailov11-Jun-06 7:25 
AnswerRe: Menu Bitmaps from Minimal Source Code in Dialog Pin
Gary R. Wheeler11-Jun-06 8:21
Gary R. Wheeler11-Jun-06 8:21 
GeneralRe: Menu Bitmaps from Minimal Source Code in Dialog Pin
Igor Mihailov11-Jun-06 9:30
Igor Mihailov11-Jun-06 9:30 
GeneralRe: Menu Bitmaps from Minimal Source Code in Dialog Pin
Gary R. Wheeler11-Jun-06 10:44
Gary R. Wheeler11-Jun-06 10:44 
GeneralRe: Menu Bitmaps from Minimal Source Code in Dialog Pin
Igor Mihailov11-Jun-06 20:14
Igor Mihailov11-Jun-06 20:14 
QuestionHow to detect if XML resource is UTF8 or UTF16 Pin
Andre xxxxxxx11-Jun-06 7:01
Andre xxxxxxx11-Jun-06 7:01 
AnswerRe: How to detect if XML resource is UTF8 or UTF16 Pin
bob1697211-Jun-06 8:31
bob1697211-Jun-06 8:31 
AnswerRe: How to detect if XML resource is UTF8 or UTF16 Pin
Michael Dunn11-Jun-06 9:54
sitebuilderMichael Dunn11-Jun-06 9:54 
GeneralRe: How to detect if XML resource is UTF8 or UTF16 Pin
Andre xxxxxxx11-Jun-06 10:20
Andre xxxxxxx11-Jun-06 10:20 
QuestionChange User-Agent String with BHO Pin
nmx_de11-Jun-06 5:27
nmx_de11-Jun-06 5:27 
Questionsorting Pin
RockyJames11-Jun-06 4:02
RockyJames11-Jun-06 4:02 
AnswerRe: sorting [modified] Pin
Stephen Hewitt11-Jun-06 4:42
Stephen Hewitt11-Jun-06 4:42 
GeneralRe: sorting Pin
Roland Pibinger11-Jun-06 8:25
Roland Pibinger11-Jun-06 8:25 
GeneralRe: sorting Pin
Stephen Hewitt12-Jun-06 2:01
Stephen Hewitt12-Jun-06 2:01 
QuestionFrustrated [modified] Pin
antonaras11-Jun-06 0:12
antonaras11-Jun-06 0:12 
Hi again guys
i have a strange problem.

i'm reading from a file character by character and i'm pushing the characters into a queue like this
<br />
do{<br />
c = getc (pFile);<br />
plainText.push(c);<br />
} while (c != EOF);<br />


so far so good then i copy the content of the queue into a string but i try to remove all unessesary spaces

<br />
string text;<br />
while (!PlainText.empty()) <br />
{<br />
   if (PlainText.front()!=' ')<br />
   {<br />
	Plain_Text+=PlainText.front();<br />
	PlainText.pop();<br />
   }<br />
   else if(PlainText.front()==' ')<br />
   {<br />
	while(PlainText.front()==' ' && !PlainText.empty() )<br />
	{<br />
		PlainText.pop();<br />
	}<br />
	Plain_Text+=" ";<br />
    }<br />
		<br />
}<br />

I'm not sure if i made my self clear so i'll give you an example.
lets say i have this writen in a file
 <br />
This      is     writen   in<br />
a text       file      but with      more than     one <br />
spaces      in  between the   words 


i want to copy the contents of this file into the string
but in this form
This is writen in a text file but with more than one spaces in between the words

My code doesn't make any changes it lives all the spaces as they where
any ideas pls help
Thanks a lot

-- modified at 6:13 Sunday 11th June, 2006
AnswerRe: Frustrated Pin
YaronNir11-Jun-06 1:34
YaronNir11-Jun-06 1:34 
GeneralRe: Frustrated Pin
antonaras11-Jun-06 21:26
antonaras11-Jun-06 21:26 

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.