Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:58:28+00:00 2026-06-07T05:58:28+00:00

For the first time, I am writing a fairly complex application, which will remember

  • 0

For the first time, I am writing a fairly complex application, which will remember the user’s name, gender, age, etc. Here is what I need to happen:

  • The application starts, and it checks to see if the information (name, age, etc) has been saved.
    • If not, the application gets this info and saves it.

When the user restarts this program, the program should see that the information is saved, and will save this information as C++ variables.

I can give more information if you don’t know what I want. I have never done this before, and after searching the internet for a long time, I’ve only become more confused, so I’m afraid I need some serious hand holding, sorry.

Thanks,

-Chris.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:58:30+00:00Added an answer on June 7, 2026 at 5:58 am

    It looks like you’re new to C++, so I would recommend saving the information to a file. (that is where my coursework started, not with databases)

    something like this should do the trick:

    #include <iostream>
    #include <fstream>
    #include <string>
    int main(){
        ifstream input("your_saved_file.txt");
        string name="", age="", etc="";
        input >> name >> age >> etc;
        if(name=="" || age=="" || etc==""){
            input.clear(); input.close();
            ofstream output("your_saved_file.txt");
            cout << "Enter name: ";
            cin >> name;
            cout << "Enter age: ";
            cin >> age;
            cout << "Enter etc: ";
            cin >> etc;
            output << name << endl << age << endl << etc << endl;
            output.close(); output.clear();
        }
        else{
            input.clear(); input.close();
            cout << "Name: " << name << " Age: " << age << " Etc: " << etc;
        }
        return 0;
    }
    

    hope that’s the kind of thing you’re looking for,

    reagan

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First question from a long time user. I'm writing a Perl script that will
I'm writing my first real MVVM application, and the first step the user will
I'm writing a facebook desktop application for the first time using the PyFacebook api.
I'm writing some user controls for the first time and I'm wondering if there's
I am writing a program where I where the first time a user runs
First time I'm writing something here. I have a question that i hope someone
I am writing a fairly complex iPad app - my first bigger one. This
I'm writing an application which first connect to the database and retrieves a dt
I'm writing a web application in Symfony for the first time, so I have
For the first time, I am writing a web service that will call upon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.