473,834 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving an array

I have an array of items that I need to save to a file. How do you do this?
Nov 27 '05 #1
3 5153

"deanfamily " <de********@ver izon.net> wrote in message
news:Vspif.4846 $AB2.544@trnddc 08...
I have an array of items that I need to save to a file. How do you do
this?


Iterate through the array and save each item.

- Oliver
Nov 28 '05 #2

"deanfamily " <de********@ver izon.net> wrote in message
news:Vspif.4846 $AB2.544@trnddc 08...
I have an array of items that I need to save to a file. How do you do

this?

Iterate through the array and either write each item to a line in a file -
OR - build a delimited String from the array and write the string to a file.

Aftr you do that - your next question would be how to open and read a file.

Nov 28 '05 #3

"deanfamily " <de********@ver izon.net> schreef in bericht
news:Vspif.4846 $AB2.544@trnddc 08...
I have an array of items that I need to save to a file. How do you do
this?


Depends on the type of items, the short and easy answer to your question is
: buy a beginner level Java book or find tutorials online. If you're more
specific regarding the items that need saving people can probably help you
out
Apr 9 '06 #4

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

Similar topics

6
2735
by: Duncan Smith | last post by:
I am having problems saving arrays to file. e.g. >>> t1 array() >>> t2 array() >>> t3 array() >>> t4 array(,
2
2299
by: eth0 | last post by:
I hate to ask like this as I normally like to work things out for myself, but I am running out of ideas....and hair !!! I am writing a stock inventory program using structures. The program data is initially populated by hand, and then there is an option to save the array of structures to disk. If the program is exited, the data will need to be inserted back into the program, hence the load function.
3
16276
by: andy_ro | last post by:
Hi group, I have an web application where the user can upload a pdf file. This file is stored in a table, in a column of type ntext. The user can later request the content of this column, and the application should open a new page and load the pdf content. My problem: If I read the uploaded pdf file into a string variable and then I response.write it right away to another page, it shows fine (I can see a pdf
1
1204
by: pmclinn | last post by:
I have a formated a structure as follows: <Serializable()>public structure stcOutPut private data as string private visi as string end structure Instances of this strucuture are stored in an array list. Dim z as new arraylist
3
3631
by: JamesB | last post by:
I am saving image files from my website using the downloaddata on the web client. This gives me a byte array, which I am then saving to a file with the following code: ' Create the new, empty data file. If File.Exists(ImgDest) Then Console.WriteLine("{0} already exists!", ImgDest) Return End If Dim fs As New FileStream(ImgDest, FileMode.CreateNew)
12
2018
by: tjonsek | last post by:
I get a generic error (not very helpful) when attempting to save a re-sized image back to its original location. Here is the code snippet: Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(Me.File1.Value) Dim thisFormat = g.RawFormat Dim imgOutput As New Bitmap(g, 800, 600) Dim strFileType As String Dim strFileName As String = File1.PostedFile.FileName
5
1911
by: Keith G | last post by:
VS2003 using VB.Net I want to be able to save drawing path data in a database. If I store the Points array for each GraphicsPath I can then reproduce (in this case) filled polygons at run time. The user will create the polygons initially. The number of points in the polygons will vary so I only want to save this data in one field (rectangles would have been a lot easier). The only way I can think of doing this is by saving the points...
8
4180
by: Yu SONG | last post by:
Hi all, What would be the most efficient way to save an array of floats to a file (in text format)? At the moment, my code looks like: /* * Saving an array of floats to a file
14
2067
by: Simon | last post by:
I'm trying to write a little function to save data. Basically I have a large 2d array of structs, so I'm going to have to call the save function once per struct in the array. I'd like to save the data using fwrite(). After quite a lot of effort I've come up with the code below, but I'm having real difficulty getting rid of the last error. When compiling, I get this: Line 52: "warning: assignment makes pointer from integer without a...
1
1699
by: WebCM | last post by:
We can do it in different ways. Configuration data are sent by POST. Some of them should be parsed before saving to file. Perhaps, I will use var_export(). However, how to do it best? 1. Without a class / function. Fields names have no prefix and are equal to $cfg array's indexes. <input name="option_name" /> In every file of options form (e.g. main options, content options, e-
0
9799
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, 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...
0
10793
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, 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...
1
10548
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9331
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, 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...
0
6954
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();...
0
5627
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...
0
5794
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3081
bsmnconsultancy
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...

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.