473,385 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to save data in array permenantly

pls help.. i have no idea how to save data in array permentantly..
Aug 11 '06 #1
2 3811
Banfa
9,065 Expert Mod 8TB
Write it to a file, look you the functions

fopen
fclose
fread
fwrite
fgets
fputs
fgetc
fputc
fprintf
fscanf <-- but don't use this function
Aug 11 '06 #2
Hi All,

Any array can be defined permanently by adding a "const" intializer to the array.

For example a sample array would look like...

const unsigned int A[5] = {1,2,3,4};

Similar consts can also be used for other data tyoes as well. A good suggestion would bt to go thru YashWant Kanetkars "Let Us C" which goes through these details ina very simple language.

I hope i hve made things simplr.
Aug 19 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: pfemat | last post by:
Hi there, i am doing some heavy computations whose result i want to save to harddisk. the results are in an long array named screen and i thought of doing char *tmp =...
41
by: Mountain Bikn' Guy | last post by:
What is the current preferred way to save user preferences in dotnet? Is the registry the right place to do this? Can anyone recommend a good article (or book) for this topic? Thanks.
15
by: Sharon | last post by:
Hello gurus, I have a System.IntPtr pointing to the memory address of my image (not a ..NET image). I wish to save this image data pointed by the IntPtr to a raw data file. The way I now to...
5
by: scrawford | last post by:
Hi all, I want to save a variable's value in a form permenantly, is there a way I can do that? Background is: I have created a database that imports one of two different files when the user...
2
by: mpreisdorf | last post by:
I want to save the raw data of a class (without the .NET object overhead) to a binary file. For example: ref class Test { public: String^ name; Int32 number; ..... }
3
by: =?Utf-8?B?Um9nZWxpbw==?= | last post by:
I'm having the wierdest problem. I'm trying to save images into a SQL 2005 database. the field is just called "IMAGES" and hte data type is "image". here is my code to save //following code...
10
by: Gilles Ganault | last post by:
Hello Out of curiosity, is there a smarter, easier way to read data sent by a form, and save them into a database? I have about 20 fields, and it'd be easier if I could just use a loop to go...
1
by: supahsain | last post by:
I got this assignment, and almost have no clue, and my teacher doesn't even teaches us anything This is what i am suppose to do...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.