In c++ i have a .dat file tha contains the following 123-45-6789 Kirk James 44.7 88.99 0.0175 124-89-0007 Bond Jane 45.6 65.75 0.04 405-77-8911 Puff Blossom 40 33.88 0.03 405-10-9871 Puff Buttercup 41.2 45.66 0.047 223-03-8761 Puff Bubbles 37.8 33.44 0.015 980-11-2201 Joneski Kasey 23.1 10.77 0.033 115-88-7619 Crooke I.M.A. 25.4 88.75 0.02 777-00-1232 Smith Alias 43.5 22.3 0.034 345-89-0022 DeMann Stan 56.7 29.45 0.065 210-37-1192 Jones Jeane 48.9 20.33 0.025 103-22-4321 Smith Alias 33.5 19.67 0.063   i have working code that reads the file but I have no idea on how to pass pointers of each variable i have to the void calculations() functions to be able to see wich person has over time and such   #include <iostream>#include <fstream> void calculations();int main() { string ssn ,lastname, firstname;float hours, pay_hour, personal_tax_rate ifstream myfile ("employee.dat"); while (myfile >> ssn >> lastname >> firstname >> hours >> pay_hour >> personal_tax_rate){cout << ssn << " " << lastname << " " << firstname << " " << hours << " " << pay_hour << " " << personal_tax_rate << "\n";}   }void calculations(){ }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In c++ i have a .dat file tha contains the following

123-45-6789 Kirk James 44.7 88.99 0.0175
124-89-0007 Bond Jane 45.6 65.75 0.04
405-77-8911 Puff Blossom 40 33.88 0.03
405-10-9871 Puff Buttercup 41.2 45.66 0.047
223-03-8761 Puff Bubbles 37.8 33.44 0.015
980-11-2201 Joneski Kasey 23.1 10.77 0.033
115-88-7619 Crooke I.M.A. 25.4 88.75 0.02
777-00-1232 Smith Alias 43.5 22.3 0.034
345-89-0022 DeMann Stan 56.7 29.45 0.065
210-37-1192 Jones Jeane 48.9 20.33 0.025
103-22-4321 Smith Alias 33.5 19.67 0.063
 
i have working code that reads the file but I have no idea on how to pass pointers of each variable i have to the void calculations() functions to be able to see wich person has over time and such
 

#include <iostream>
#include <fstream>

void calculations();
int main()

{

string ssn ,lastname, firstname;
float hours, pay_hour, personal_tax_rate

ifstream myfile ("employee.dat");

while (myfile >> ssn >> lastname >> firstname >> hours >> pay_hour >> personal_tax_rate)
{
cout << ssn << " " << lastname << " " << firstname << " " << hours << " " << pay_hour << " " << personal_tax_rate << "\n";
}

 

}
void calculations()
{

}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Binary Search Algorithm
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education