473,396 Members | 1,689 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,396 software developers and data experts.

Appended mode ?

Below is my code:

ofstream out(Results);
if (!out.is_open()){
cerr <<"Cannot open file" "" <<Results<<endl;
exit(EXIT_FAILURE);
However, everytime I run the program, it wipes out previous data.
Is there an "append mode?

thanks for any help.

Oct 26 '05 #1
1 1117
tv****@hotmail.com wrote:
Below is my code:

ofstream out(Results);
if (!out.is_open()){
cerr <<"Cannot open file" "" <<Results<<endl;
exit(EXIT_FAILURE);
However, everytime I run the program, it wipes out previous data.
Is there an "append mode?


What does your FM say about 'ofstream' constructors? Hint: there is
the second argument that controls the mode in which the file is opened.
HintHint: std::ios::app

V
Oct 26 '05 #2

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

Similar topics

2
by: Karuppasamy | last post by:
Hi I am using a variable of StringBuilder to form a string. After appending a string of value like this {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Verdana;}}
1
by: Victor | last post by:
I'm retrieving values from the textboxes that I created dynamically. However I get commas appended to my text values and just a comma wherever the textbox is empty. Dont know what is causing this....
5
by: Matt | last post by:
I wrote the tcp socket client-server program that the server will echo the message received from the client. In client program: char sendBuf; while(1) { cout << "Enter message:";...
1
by: windandwaves | last post by:
Hi Folk I am working with the TYPE property. I want to change that from 2 (byte) to 4 (long integer) for a field that already contains tons of data. How can I do that? The help reads: ...
1
by: Wajih-ur-Rehman | last post by:
Hi, I use the following way to write to the Windows Event Log from my C# application. EventLog eventLog = new EventLog(); eventLog.Source = "My Source"; eventLog.WriteEntry("Just a...
3
by: Paulers | last post by:
Hello all, I have a log file that is appended to in real time by an application. I would like to write a loop in vb.net that reads new entires and parses them. I can get my application to open a...
4
by: thenewuser | last post by:
Hi all, I am working on windows 2000 and using php 5.0 and apache 2.0.59. I am facing a problem while parsing a text file.Actually I am using a pop server for parsing an email.I am downloading...
2
by: jopperdepopper | last post by:
Hi, was trying to do something with sessions the other day, which all worked fine, except for the fact that the session ID was being appended to my urls... this I definitely don't want because...
5
by: libsfan01 | last post by:
Hi all Im trying to write a script that pulls data from another page (which is getting data from a db). The contents displayed on the db handling page (display.php) gets transferred through...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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,...

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.