Re: File writing Problem
- From: Vamsi <vamsi_219@xxxxxxxxx>
- Date: Wed, 31 Aug 2005 09:41:04 -0400
I have 4 operations which are to done on two numbers let's say
addition,sbtraction, division and multiplication.The output resulted
due to these operation should be stored in a text file one after the
other. When I execute the program first time it's writing the output
onto the file. When I reexecute the program once again it's appending
to the file but not discarding the previous content.This happens when
I use a+ option. When i use the w+ option it's discarding the
previous content but it's writng only the fourth operation and
leaving the rest three.
I am struck and I don't know how to proceed.
Thxs
Vamsi
Jérôme wrote:
>
>
> What's about this one :
>
> 'w+' Open file, or create new file, for reading and writing;
> discard
> existing contents, if any.
>
> Jérôme
.
- Follow-Ups:
- Re: File writing Problem
- From: gopla
- Re: File writing Problem
- From: Jérôme
- Re: File writing Problem
- References:
- File writing Problem
- From: Vamsi
- Re: File writing Problem
- From: Jérôme
- Re: File writing Problem
- From: Vamsi
- Re: File writing Problem
- From: Jérôme
- File writing Problem
- Prev by Date: Re: Stateflow graphical functions
- Next by Date: 热电偶
- Previous by thread: Re: File writing Problem
- Next by thread: Re: File writing Problem
- Index(es):