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 4021464
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:21:18+00:00 2026-05-20T10:21:18+00:00

I’m trying to create a sequential file but it doesn’t seem to be working.

  • 0

I’m trying to create a sequential file but it doesn’t seem to be working. Can anyone explain how to get this to work in MS Visual Studio 2010?

#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>
using namespace std;

int main()
{
    ofstream outClientFile( "clients.dat", ios::out);

    if (!outClientFile)
    {
        cerr << "File could not be opened" << endl;
        exit(1);
    }

    cout << "Enter the Appointment Date, Time, Duration, Name," << endl
        << "Description, Contact Name, and Contact Number.\n? "; 

    int appDate, appTime, appContactNum;
    string appName, appDescription, appContactName;
    double appDuration;

    while ( cin >> appDate >> appTime >> appDuration >>
        appName >> appDescription >> appContactName >> appContactNum )
    {
        outClientFile << appDate << ' ' << appTime << ' ' << appDuration << ' ' << appName << ' ' << appDescription << ' ' << appContactName << ' ' << appContactNum << endl;
        cout << "? ";
    }
}

And here is the output after I enter one line.

Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
The program '[452] CSC275 Assignment 3.exe: Native' has exited with code 0 (0x0).
  • 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-05-20T10:21:18+00:00Added an answer on May 20, 2026 at 10:21 am

    You cannot use an int to store 10-digit telephone numbers, as the ‘largest’ telephone number you could store would be (in signed int) 2147483647 or (in an unsigned int) 4294967295. Neither of these are large enough to store a phone number from my home state with area codes 503, 541, or 971. Strings are probably best for storing phone numbers, as they expand to handle phone numbers from Czech Republic or American Samoa and so forth.

    I’m also leery of using double for storing anything other than mathematics, scientific data or physics simulations. I may be a little paranoid about this, as most applications that use double in this respect mostly get away with it, but doubles store data exactly until you slightly push outside their bounds, at which point they store data very approximately indeed.

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

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I need to clean up various Word 'smart' characters in user input, including but

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.