Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
I am learning c++, and I kind of confused about file stream. Like this code:
ifstream inFile("inventory.dat");
Can I understand this code creat a file named inventory and open (or write) something in the file?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 5 steps
Knowledge Booster
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
- 2. Suppose that you are implementing a program to write a string "CSE SS0" in a binary file. Java provides you three different methods – writeBytes(String), writeChars(String), and writeUTF(String). How many bytes will be written by each of those method for the give string? Which method did you find as the most efficient?arrow_forwardC++ Write a program that reads (arbitrarily many) integers from a file named by the user and outputs the 3rd smallest integer read. The file integers are in arbitrary order, and the file may have a different number of integers on different lines. You should not store many numbers all at once to do this! You'll only need a few integer variables, one for the smallest thus far, one for the second smallest thus far and one for the third smallest thus far. I strongly suggest you work out you code in pseudocode first.arrow_forwardPlease help me debug my C++ Program. Leave as much original source code as possible just show corrections. int main() {string fileName{};cout<< "What is the file name";cin >> fileName; ifstream inFile;infile.open(fileName); ofstream outfile;outfile.open(Ch3_Ex5Output.dat"); string lastName{};string firstName{};double currentSalary{0};double percentIncrease{0}; while(!inFile.eof()){inFile >> lastName >> firstName >> currentSalary >> percentIncrease; currentSalary += currentSalary * percentIncrease / 100; outfile<< firstName << " " << lastName << " " << currentSalary << endl; } infile.close(); outfile.close(); return 0; }arrow_forward
- Written using code C++. Only use the headers <iostream> and <fstream>. Do not utilize any additional headers. Thank you! Write a program that reads a file encoded with the "rot13" cypher, decodes it, and stores the decoded file. The decoded file name should be the original file name with the word "coded" attached.arrow_forwardHow do you write a code in c++ that gives the user an option to save(write) a program(example the program arranges numbers in ascending order) onto a text file.arrow_forwardcan you do it pythonarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education