473,386 Members | 1,668 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,386 software developers and data experts.

Saving int,char etc... in C++ to work with later

17
i want to ask how can you save like for example char , or a string in c++ for multiple uses. like when you close the program and when you reopen it you can see what you entered.
i need this to know how exacly ill make the adress book which can be used quite useful
Sep 27 '07 #1
6 1445
Savage
1,764 Expert 1GB
i want to ask how can you save like for example char , or a string in c++ for multiple uses. like when you close the program and when you reopen it you can see what you entered.
i need this to know how exacly ill make the adress book which can be used quite useful
You can do that with files,or with not using clrscr(offcourse if you after running your program you run it again).I suppose that you prefer files.Do you know to work with them?No?If so find some good tutorials(you have here in c++ articlesHav section artcile:How to parse a file?)

Have fun..

Savage
Sep 27 '07 #2
mitola
17
thanks mate. ill try my best
Sep 27 '07 #3
mitola
17
em could you just post link it give me strange results and i do not find corect article i think
Sep 27 '07 #4
Savage
1,764 Expert 1GB
em could you just post link it give me strange results and i do not find corect article i think
Sure,here you go.

This article covers file parsing,but you can conclude from it how to write to the file.If you still have problems after reading this article, then you can perhaps find something good from here
Savage
Sep 27 '07 #5
mitola
17
veeery nice , i was also looking for a nice pointers tutorial very useful. ill get my hands on work right now
Sep 27 '07 #6
mitola
17
i dont know something about files. how can you modify the text by alpahabet. its not meant every leter but the lines for exm.

not modifyed:
number
leter
root
car
auto

modifyed:
auto
car
leter
number
root

and how can you compare two lines when doing with files.
Oct 9 '07 #7

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

Similar topics

3
by: Bill H | last post by:
I'm really new to Internet apps and such sorry, if this is a "duh" question. What is the standard approach to saving input from a form if on submit the database connection fails? I'm thinking...
4
by: Jacob H | last post by:
Hello list... I'm developing an adventure game in Python (which of course is lots of fun). One of the features is the ability to save games and restore the saves later. I'm using the pickle...
1
by: Kevin Ingram | last post by:
Ok, this is probably a silly question but I just keep hitting a brick wall here. I usually develop my sites entirely in ASP and use a database for data storage, works great for me. I also...
2
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...
16
by: drj0nson | last post by:
What is the right way of creating a string/char array and assigning to a char* which is then used in a function call. Thought it would be quite nice to avoid a memory leakage /core dump. 1...
3
by: sieg1974 | last post by:
Hi, I have made this simple program to understand char ** pointers, but I still having many questions. int main() { char ** testPointerPointerChar = 0; char * A = "string01";
5
by: jab3 | last post by:
(again :)) Hello everyone. I'll ask this even at risk of being accused of not researching adequately. My question (before longer reasoning) is: How does declaring (or defining, whatever) a...
14
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...
4
by: mlamb1 | last post by:
I have some code that works it seems a bit of a hack. I want to know if there is a more c++y way to do it. Here's my code:- class CMyClass{ public: void Save(CFile fOut); void Load(CFile...
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...
0
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,...
0
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,...
0
jinu1996
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...

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.