Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Frustrated Pin
Saurabh.Garg11-Jun-06 2:26
Saurabh.Garg11-Jun-06 2:26 
GeneralRe: Frustrated Pin
antonaras11-Jun-06 21:28
antonaras11-Jun-06 21:28 
GeneralRe: Frustrated Pin
David Crow12-Jun-06 3:35
David Crow12-Jun-06 3:35 
Questionhelp with editable listview control Pin
Tara1410-Jun-06 22:55
Tara1410-Jun-06 22:55 
AnswerRe: help with editable listview control Pin
Hamid_RT11-Jun-06 0:58
Hamid_RT11-Jun-06 0:58 
GeneralRe: help with editable listview control Pin
Tara1411-Jun-06 1:58
Tara1411-Jun-06 1:58 
GeneralRe: help with editable listview control Pin
Hamid_RT11-Jun-06 2:35
Hamid_RT11-Jun-06 2:35 
QuestionMFC LoadFrame Bug [modified] Pin
fangzj10-Jun-06 22:10
fangzj10-Jun-06 22:10 
QuestionHOw to list all the deleted files ina directory???? Pin
Inder gujral10-Jun-06 21:55
Inder gujral10-Jun-06 21:55 
AnswerRe: HOw to list all the deleted files ina directory???? Pin
Michael Dunn10-Jun-06 22:57
sitebuilderMichael Dunn10-Jun-06 22:57 
AnswerRe: HOw to list all the deleted files ina directory???? Pin
Hamid_RT11-Jun-06 0:44
Hamid_RT11-Jun-06 0:44 
QuestionLooking for some API method \ or some other way to get all file list in some folder. Pin
Yanshof10-Jun-06 21:15
Yanshof10-Jun-06 21:15 
AnswerRe: Looking for some API method \ or some other way to get all file list in some folder. Pin
YaronNir10-Jun-06 22:14
YaronNir10-Jun-06 22:14 
AnswerRe: Looking for some API method \ or some other way to get all file list in some folder. Pin
Hamid_RT11-Jun-06 0:36
Hamid_RT11-Jun-06 0:36 
Questionhttp post &amp; cookie response... for 'logins' Pin
chasetoys10-Jun-06 20:28
chasetoys10-Jun-06 20:28 

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.