Can anyone please help me in writing the code in C++ :
I want a read a file line by line,remove the lines which have length of
a particular field in a line exceeding 63 characters After removing the
line the corresponding blank spaces generated after removal of the
line also needs to be removed.
..
I am in urgent need for this solution.Kindly help how to go about it.
Thanks in advance ,
Kaushik 4 2581
"kaushiksho me" writes:
Can anyone please help me in writing the code in C++ :
I want a read a file line by line,remove the lines which have length of
a particular field in a line exceeding 63 characters After removing the
line the corresponding blank spaces generated after removal of the
line also needs to be removed.
.
I am in urgent need for this solution.Kindly help how to go about it.
Where is your problem at? Can you open a file? read a line? write a line?
What is it you can't do?
In article <11************ **********@d34g 2000cwd.googleg roups.com>, ka**********@gm ail.com says...
Can anyone please help me in writing the code in C++ :
I want a read a file line by line,remove the lines which have length of
a particular field in a line exceeding 63 characters After removing the
line the corresponding blank spaces generated after removal of the
line also needs to be removed.
.
I am in urgent need for this solution.Kindly help how to go about it.
You can't delete data from the middle of the file, so you have to copy
data from the existing file to a new file, skipping over the parts you
don't want.
--
Later,
Jerry.
The universe is a figment of its own imagination.
Boss I am new at C++ programming.... .how can I open , read and write it
to a new file after ignoring certain lines..kindly tell me how to go
about it...(code)
Regards,
Kaushik
osmium wrote:
"kaushiksho me" writes:
Can anyone please help me in writing the code in C++ :
I want a read a file line by line,remove the lines which have length of
a particular field in a line exceeding 63 characters After removing the
line the corresponding blank spaces generated after removal of the
line also needs to be removed.
.
I am in urgent need for this solution.Kindly help how to go about it.
Where is your problem at? Can you open a file? read a line? write a line?
What is it you can't do?
Ok...let me analyse it and I shall get back to u soon..
thanks for replying..
regards,
Kaushik
Jerry Coffin wrote:
In article <11************ **********@d34g 2000cwd.googleg roups.com>, ka**********@gm ail.com says...
Can anyone please help me in writing the code in C++ :
I want a read a file line by line,remove the lines which have length of
a particular field in a line exceeding 63 characters After removing the
line the corresponding blank spaces generated after removal of the
line also needs to be removed.
.
I am in urgent need for this solution.Kindly help how to go about it.
You can't delete data from the middle of the file, so you have to copy
data from the existing file to a new file, skipping over the parts you
don't want.
--
Later,
Jerry.
The universe is a figment of its own imagination.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Majordomo |
last post by:
--
>>>> --36742377
**** Command '--36742377' not recognized.
>>>> Content-Type: text/plain; charset=us-ascii
**** Command 'content-type:' not recognized.
>>>> Content-Transfer-Encoding: 7bit
**** Command 'content-transfer-encoding:' not recognized.
>>>>
>>>> something is fool
|
by: Ruben |
last post by:
Hello.
I am trying to read a small text file using the readline statement. I
can only read the first 2 records from the file. It stops at the blank
lines or at lines with only spaces. I have a while statement checking
for an empty string "" which I understand represents an EOF in Python.
The text file has some blank lines with spaces and other with blanks.
Thanks a lot.
|
by: Rigga |
last post by:
Hi,
I am new to Python and need to parse a text file and cut parts out i.e. say
the text file contained 5 rows of text:
line 1 of the text file
line 2 of the text file
line 3 of the text file
line 4 of the text file
line 5 of the text file
|
by: Martin Svensson |
last post by:
Hello!
I need some help/recommendations on how to do the following.
I have a program that writes an IP address two control numbers and a
date to file, on one line. It's a basic text file and it looks like this:
----- beginning of file -----
192.168.0.1 0 0 2004-08-01
192.168.0.2 1 0 2004-08-21
192.168.0.4 0 1 2004-08-12
|
by: Andyza |
last post by:
I'm using FileSystemObject to open and write to a tab delimited text
file.
First, I connect to a database and select some data. Then I create the
text file and insert each record in the text file. At the end of each
record I insert a vbCrLf character in the text file to create a new
line. Thus each record is in a new line.
The problem is that I get a tab delimited text file where the LAST LINE
in the text file is always a blank line....
| |
by: I. Myself |
last post by:
This is about reading the .ini files which are used in several of our
projects.
Currently, the actual read of each line of the file is with this statement:
fscanf(file, "%s %s", name, value); /* reads two strings from .ini
file */
This works, but it does not allow any comments to the right of the two
strings.
|
by: peter.vanna |
last post by:
I would like to write a program to read a text file (data.txt) on
Windows and Linux machines.
data.txt is formated as follows:
1 10 100 1000
2 20
(a new but empty line)
|
by: arnuld |
last post by:
This works fine, I welcome any views/advices/coding-practices :)
/* C++ Primer - 4/e
*
* Exercise 8.9
* STATEMENT:
* write a program to store each line from a file into a
* vector<string>. Now, use istringstream to read read each line
* from the vector a word at a time.
|
by: rohit |
last post by:
Hi All,
I am new to C language.I want to read integers from a text file and
want to do some operation in the main program.To be more specific I
need to multiply each of these integers with another set of integers
stored in an array.It would be a great help if you could provide some
code for it.I tried the function fscanf but by that I am able to read
only the first integer of the text file.Please help me.
|
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: 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: 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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |