|
-
Sep 18th, 2000, 04:26 AM
#1
Hi all,
I'm trying to save a file that contains two lines of information. One line is the Sender's name, the next line is the receiver's name.
However, when i save the file, it appends quotaion marks ("") to the beginning and end of each lin. How do I prevent this from happening?
thanx
-
Sep 18th, 2000, 04:32 AM
#2
Fanatic Member
what method are you using, Binary, Output, or Input or whatever. Because it depends on that, or it might depend on the method u write to the file. There's print, line...
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Sep 18th, 2000, 04:34 AM
#3
Frenzied Member
Use this:
Open "c:\foo.dat" for Output As #1
Print #1, SenderName
Print #1, RecieverName
Close #1
If you want to add those two lines to the end of c:\foo.dat, use the code:
Open "c:\foo.dat" For Append As #1
Print #1, SenderName
Print #1, RecieverName
Close #1
-
Sep 18th, 2000, 04:35 AM
#4
transcendental analytic
Shoudn't be hard
Code:
open file for output as #1
Print line1
Print line2
close #1
use append instead of output if you don't want it to overwrite, don't use binary if this is the only purpose of the file
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|