|
by: Tom Johnson |
last post by:
Hi all, I cant believe that Im stuck on such simple code, but I am
so...
Im trying to open a text file for writing but can never get the file
to initially open. Heres what Im having trouble with.
-----------------------------------------------
#include <iostream.h>
#include <fstream.h>
void main()
|
by: Colum |
last post by:
Hi,
I am trying to write data out to a file on floppy disk,
If the disk is present in the drive the program runs fine and outputs the
data correctly, however if the disk is not present in the drive, the program
enters the while loop which asks user to insert the disk and continuously
tries to open it, after the user has inserted the disk the program seems to
run fine, however there is no data in the output file.I think it could be a...
|
by: slyphiad |
last post by:
i'm kinda new at c++ so be patient ^_^
i was just wondering if u guys could help me to solve this problem
that i had.
i'm trying to create 5 sequential files using ofstream.
this is what i did below:
char filename =
{"quest.01.cpp","quest.02.cpp","quest.03.cpp","quest.04.cpp","quest.05.cpp"};
|
by: BCC |
last post by:
Hi I have an application/project called HKDemo. In HKDemo.cpp, in the usual
init stuff for the main class HKDemoApp, I can use the following code with
no problems:
ofstream out_file("test.txt", ios::out);
try {
out_file << "some stuff" << endl;
}
catch (...) {
}
|
by: ambar.shome |
last post by:
Hi,
We are working on Solaris SunOS 5.8. We are using ifstream of iostream
namespace. The snippet is given below:
#include <iostream.h>
#include <fstream.h>
boolean readFile()
{
char readStr;
|
|
by: Squid Seven |
last post by:
I'm trying to use a pointer to an ofstream object and having problems:
ofstream *sessionFile = NULL;
if( directory == "" )
sessionFile = new ofstream( fileName.c_str(), ios::out );
else
{
|
by: shawn |
last post by:
Hi All,
Am using MSVC6 compiler on a WinXP machine.
Am trying to read a file using std::ofstream;
the problem is that Tofstream.is_open() fails and Tifstream.rdstate()
returns "2" which translates to "The system cannot find the file
specified.".
This is really weird because the said file am tring to read exists on
the disk at the required location.
SNIPPET:-
|
by: magix |
last post by:
Hi,
I got following to savefile into Output.txt, but how can I specify it to be
in specific folder/directory (not at the same directory as the executables?
Currently, it will generate the output.txt under the same directory as the
executables.
std::stringstream stream;
stream << "Output.txt" << std::flush;
std::ofstream SaveFile(stream.str().c_str());
|
by: Abubakar |
last post by:
Hi,
If I write the following code:
ofstream f;
f.open("c:\\hello.txt", ios::binary | ios::out);
how do I check if the file is successfully opened and ready to write ?
Should I do a f.is_open() check ?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|