473,320 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to deal with this problem

CString inputf="wc.txt";
CFile iFile( _T(inputf), CFile::modeCreate|CFile::modeReadWrite);
char buf[100*1024];
iFile.Read(buf,100*1024);
CString csml;
csml=buf;
csml.Replace("&nbsp;<"," ");
iFile.Write(csml,strlen(csml));
iFile.Close();
//-------------------------------------------------------------------------Â*-------

this code reads the content of wc.txt to csml, and replace the
characters with " ", then save the result to wc.txt.
but unfortunately, bad things happen, the goal doesn't achieved.
i think the reason is the program can't find the end of the string
"\0".
i want to ask how to deal with it?
thanks very much!

Jun 18 '06 #1
2 1434
In article <1150600906.961101.27120
@p79g2000cwp.googlegroups.com>, dc***@insun.hit.edu.cn
says...

[ MFC code elided ]
this code reads the content of wc.txt to csml, and replace the
characters with " ", then save the result to wc.txt.
but unfortunately, bad things happen, the goal doesn't achieved.


If you want some advice about how to do something at
least vaguely similar in a standard fashion, we might be
able to help out, but if you want advice about using MFC,
you'll probably need to ask somewhere that it's topical.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jun 18 '06 #2
我是最好的 wrote:

[OT stuff]

Please don't multi-post. If you wish to post to more than one group,
cross-post.

--
Ian Collins.
Jun 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Franco Gustavo | last post by:
Hi, Please help me to understand this, because I don't see what I'm missing. I was reading a lot of examples on Internet that explain that C# doesn't implement multiple inheritance it...
9
by: Wolfgang Kreuzer | last post by:
Try hard to become familiar with T-SQL. Can anybodey tell me the best way to deal with set's provided by a stored procedure. Til yesterday I thougt trapping set in temp table using INSERT EXEC...
23
by: Steve Jorgensen | last post by:
Hi all, I'm working on a project through a consulting company, and I'm writing some database code for use in another programmer's project in Excel/VBA. The other programmer is working through...
7
by: rbt | last post by:
The house almost always wins or are my assumptions wrong... import random amounts = results = count = 0 while count < 10:
0
by: AWHF | last post by:
hey, is there anyone who know how to deal with vector? i have 2 files as below: file1.doc ::component list ::Start green in grp1 blue in grp2
89
by: Tubular Technician | last post by:
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the...
10
by: WebCM | last post by:
There is a function: http://paste.ubuntu.com/21865 It needs GMT date in YYYY-MM-DD HH:MM:SS format - in SQL: datetime. If date is the same as today, the function returns "Today". There is one...
3
by: Jorgen Bodde | last post by:
Hi All, I am relatively new to python unicode pains and I would like to have some advice. I have this snippet of code: def playFile(cmd, args): argstr = list() for arg in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.