|
by: nightflyer |
last post by:
Hi all,
[code snippet appended at the end.)
my question:
A class has a few string variables with not know length at design
time.
Now I declare lets say a 1000 of those classes and put them in a vector.
Can I write that vector directly to a binary file?
|
by: Phil Slater |
last post by:
I'm trying to process a collection of text files, reading word by word. The
program run hangs whenever it encounters a word with an accented letter
(like rôle or passé) - ie something that's not a "char" with an ASCII code
in 0..127
I've searched the ANSI C++ standard, the internet and various text books,
but can't see how to workaround this one. I've tried wchar_t and wstring
without success.
But rather than spending lots of time on...
|
by: Shane |
last post by:
Hi,
Thanks in advance for the help. I have been to many websites and tried
several solutions to my problem, but have fixed part of it. It's time to
come humbly to the newsgroups for help :-)
By the way, please don't reply just to tell me that my code isn't optimized
and that I should use a delimited database rather than a line by line
record. If I had my way, I'd do it differently too.
|
by: Drew Yallop |
last post by:
I read an XML file with a stream reader in VB.Net. When I
look at the stream reader output in debug mode (by
passing cursor over the stream reader object)the format
is a perfect replica of the file as displayed when I open
the xml file in VS .net 2003 IDE.
When I perform the same procedure in C# the stream reader
obkect displays a chaotic mess. Lots of whitespace after
and "\r" and "\n" after each element. The problem is that
I cannot...
|
by: Nick |
last post by:
I have found a class that compresses and uncompresses data but need
some help with how to use part of it below is the deflate method which
compresses the string that I pass in, this works OK. At the end of
this message is the inflate method this is where I get stuck I know
that I need a byte array but because I am decompressing a string I
have no idea of how big the byte array will need to be in the end (the
inflate and deflate methods...
|
|
by: Mad Scientist Jr |
last post by:
i'm trying to read a file byte by byte (and later alter the data and
write it to a 2nd file byte by byte) and running into a problem where
it seems to keep reading the same byte over and over again (an endless
loop). i thought that BinaryReader.ReadByte advanced to the next byte?
i had it time out after 1000 iterations, and keeps outputting the same
byte. any help appreciated, my code is below:
Imports System.io
|
by: T Driver |
last post by:
Anyone have any idea how I can do the following?
I have a connection to an XML file on a site I do not control, getting
a string representation of the xml data that I can then feed to my
XmlDataSource object (CurrentXMLData):
Stream newStream =
myWebClient.OpenRead(myStringWebResource);
TextReader newReader = new StreamReader(newStream);
string newData = newReader.ReadToEnd();
CurrentXMLData.Data = newData;
|
by: Eric Lilja |
last post by:
Hi! I have a program with a class that needs to be able to write
itself to a file in clear text format. The file has two integers and
vector of struct objects. The struct has a string that can consist of
one or more words and a few integers. I'm able to create the file
properly, as confimed by viewing it in a text editor, but something
goes wrong when I tried to read it. I've made a test program
illustrating the problem:
#include...
|
by: rsk |
last post by:
Hi Friends,
I have the following code which reads the hexadecimal data from the
"data.txt" file into the arrays.
But when i run this code it is reading some garbage data after reading all
the data.
--------------------------------------------------
|
by: efrenba |
last post by:
Hi,
I came from delphi world and now I'm doing my first steps in C++. I'm
using C++builder because its ide is like delphi although I'm trying to
avoid the vcl.
I need to insert new features to an old program that I wrote in delphi
and it's a good opportunity to start with c++.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|