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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:46:35+00:00 2026-05-28T17:46:35+00:00

I’m using Dev C++ for this programming assignment. I’ll try and give a basic

  • 0

I’m using Dev C++ for this programming assignment.

I’ll try and give a basic rundown of the problem…

I’m trying to write a program that will read a time stamp and temperature reading from a file, then put the time stamp in a specific format and convert temperature to Celsius if needed. The input file has a sentinel number at the top of the file to tell how many lines of data need to be read. After this single int, each line then contains a number (ie. 200103121915 F51.13), there is a single space between the date and temp. The format is for YYYYMMDDHHMM. Without using pointers or any object oriented programming, we are supposed to convert each entry into a MM/DD/YYYY HHMM format and if the temperature is given in Fahrenheit, it needs to be converted to Celsius.

I’m running into problems with every approach I’ve tried. First, I was just going to read the entire 12 digit number as an int and then use some modulus commands to separate out each part. However, I found that int won’t hold a number that large. Next, I thought to read each digit into an array and then piece together the individual arrays into the correct format. I don’t know how to read in one digit at a time. I was thinking the array would need to be and int type, but then how would I deal with the F or C label? Basically I’m just looking for some basic ideas on how to accomplish this task, not asking for someone to write the code.

  • 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-28T17:46:36+00:00Added an answer on May 28, 2026 at 5:46 pm

    If you’re just getting started with I/O in C++, you might bookmark a reference site, because the library provides a lot of options and features.

    • cppreference.com is a non-authoritative but handy source, wiki-style.
    • Cay Horstmann wrote an article which covers more ground, and you can search for key words.
    • cplusplus.com has fairly good coverage of older language features, but has a few errors and isn’t well updated.

    As a further pointer, the std::setw manipulator might help to extract a given number of characters — although it won’t stop numeric extraction from being too greedy.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm trying to create an if statement in PHP that prevents a single post
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
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
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,

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.