473,471 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

any one help me please

4 New Member
while writing string from text file i am getting square boxes. i am using carchive function . its reading correctly but starting i am getting two square boxes. i am using embedded vc++ for windows ce can anyone tell me how to solve that?
i cant use cstdiofile it wont support:
Aug 3 '06 #1
4 1499
Banfa
9,065 Recognized Expert Moderator Expert
I assume you mean square boxes when you look at the file in a text editor. Those are non-printable characters, some of the data your are writting is not actually text.

This is possible if you get "\r'\n" the wrong way round i.e. "\n\r"
Aug 3 '06 #2
clara
4 New Member
I assume you mean square boxes when you look at the file in a text editor. Those are non-printable characters, some of the data your are writting is not actually text.

This is possible if you get "\r'\n" the wrong way round i.e. "\n\r"

but only for first line it is showing square box in starting . for next line and all it parse correctly.i have to do substring comparision. if i take that first line string due to square box i cant do comparision. how can i remove that?

my code is:

to save file to text box:

CArchive ar(&f,CArchive::store)
ar>>m_buffer;

to parse the file

if(!ar.readString(StrLine))
return;
do
{
StrTotal+=StrLine;
StrTotal+=_T("\r\n");
}while(ar.ReadString(StrLine));
m_buffer=StrTotal;
UpDatedata(FALSE)

it parse the file correctly but giving square boxes at starting.
Aug 3 '06 #3
Banfa
9,065 Recognized Expert Moderator Expert
Have you check the file against what appears in the text box to see if you are getting extra data or if it is mis-interpreting data that is already there.

Surely

ar>>m_buffer;

loads m_buffer from ar? But you have created the CArchive with the store type indicating a file open for writing.
Aug 3 '06 #4
clara
4 New Member
ya i checked that. it is not overwriting anything . but it is storing extra two square boxes at starting. to opena file i m using CArchive::Load and to save the file Carchive ::Store function but while parsing the file getting those boxes
Aug 4 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Numberwhun | last post by:
Hello everyone! I am trying to learn java and have run into kind of a snag. Here is the code that I have so far: ------ <begin_code> ---------- import javax.swing.*; import...
1
by: HolaGoogle | last post by:
Hi all, Please help me with the following..it's realy urgent and i tried everything i could and i can't get it work properly!! Thanks in advance. Here's what i'm trying to accomplish: in my...
0
by: s_erez | last post by:
Hi, This is a realy tricky one. I have an ASP.NET application where some pages are reading data from a DB and presenting reports. In order for the user to wait while the page is reading data from...
2
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
4
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
4
by: fatboySudsy | last post by:
Hi, I have constructed a client program that has given me some error codes that i just cannot see. I was wondering if a different set of eyes with much more experience than me could help me out. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.