Need help with three visual studio errors - C++ errors occuring when trying to build solution -


When I try to create this project, I get the following error:

 < Code> Error C2182: 'Read_data': Use of Illegal Type 'Zero' error C2078: Many initial errors C2440: 'Start': 'std :: ofstream' can not be converted to int  

All of the above above my function is pointing to the call on line 72, which is the line: read record_data (printout, futput);

I have seen these error codes on the MSDN site but were not able to describe what could be wrong describe it.

Any thoughts / suggestions appreciate.

  #include & lt; Iostream & gt; #include & lt; Fstream & gt; # Include & lt; Iomanip & gt; #include & lt; String & gt; using namespace std; Zero read_data (first and final, offream and output); / / East: Eaststream address & amp; The offream object function is passed to post // until the value of the data is read to zero print_data (offstream and fatup, string fan, string lamam, int largest, smallest in the end) at the end of the file; // Pre: Address of the offstream object and the FNN, LNN and the values ​​of the largest and smallest integer // in each line are sent // POST: These values ​​are with the output formatting int max (int number 1) Int number 2, int number 3, int number 4); // Pre: Four integer values ​​are passed to the function / POST: the most difference minutes of four integer values ​​(int no 1, int no 2, int number 3, int no 4) are returned; // Pre: Four integer values ​​are returned to the function / POST: the lowest int int (main) is returned by four integer values ​​{// Announce the Fstream Objects Istream finput; Offream fatigue; // Input Opening Input & amp; Output files // In every case, print an error message and if they fail to open finput.open ("Program 4_Input.txt"); If (finput.fail ()) {cout & lt; & Lt; "Failed to open the input file!" & Lt; & Lt; Endl; Withdrawal (1); } Foutput.open ("output.txt"); If (foutput.fail ()) {cout & lt; & Lt; "Failed to open the output file!" & Lt; & Lt; Endl; Withdrawal (2); } Zero read_data (output, footprint); Return 0; } // function definitions readdocument_data (ifstream & finput, ofstream and foutput) {string fname, lname; Int num1, num2, num3, num4, largest, smallest; While (phenotype> fname) {finput & gt; & Gt; Lname & gt; & Gt; Num1 & gt; & Gt; Num2 & gt; & Gt; Num3 & gt; & Gt; Num4; Largest = maximum (num1, num2, num3, num4); Small = minutes (number1, number2, number 3, number 4); Print_data (foutput, fname, lname, largest, smallest); }} Zero print_data (offset and output, string funman, string lam, int largest, int small) {foutput & lt; & Lt; Setup (15) & lt; & Lt; Fname & lt; & Lt; Setup (15) & lt; & Lt; Lname & lt; & Lt; Setup (10) & lt; & Lt; Largest & lt; & Lt; Setup (10) & lt; & Lt; The smallest & lt; & Lt; Endl; } Int max (int num1, int num2, int num3, int num4) {int lnum, lnum1, lnum2; If (num1> num2) {lnum1 = num1; } And lnum1 = num2; If (num3> num4) {lnum2 = num3; } And lnum2 = num4; If (lnum1> lnum2) {lnum = lnum1; } And lnum = lnum2; Return LNUM; } Int min (int num1, int num2, int num3, int num4) {int snum, snum1, snum2; If (num1 and lt; num2) {snum1 = num1; } Second snum1 = num2; If (num3> num4) {snum2 = num3; } Second snum2 = num4; If (snum1 & gt; snum2) {snum = snum1; } Second snum = snum2; Return snow; }   

Yes, the problem is one line

  Read record_data (output, footprint);  

inside the main function should not specify the calling return type only when it declares in other words, the line should be read simply

  read_data (Finiput, Footprint);  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -