attempting to write a program that will search a file of numbers and display the
ID: 3705082 • Letter: A
Question
attempting to write a program that will search a file of numbers and display the largest and the smallest numbers of type int. tried to build/compile my program but this red box indicates an error with my program. any help?
//This is a program to search a file of n #include #include?fstream> using namespace std: //function declaration 9 void read (ifstreami, ofstreams): int main 0 //declare variables ifstream fin: 2 13 14 ofstream fout: 15 16 int integer: int largest: int smallest: 18 fin.open ("intinrut.") 20 21 22 B if (fin.fail)) coutExplanation / Answer
You need to import "stdlib.h" header file to use exit() function.
#include <stdlib.h>
(or)
#include <cstdlib>
Lemme know if you have any queries.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.