Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

file to a function

Name: Anonymous 2011-09-04 0:43

hey,/prog/ i am trying to figure out how to pass a file onto a function , but my compiler goes ape shit when i run the following code .What am i doing wrong? thanks.
#include <iostream>
#include <fstream>
using namespace std;
float read(ifstream,float,float,float);
int main ()
{
    float a,b,c;
    ifstream file
    file.open("file.txt");
    read(quadratic,a,b,c);
   
return 0;
}

Name: Anonymous 2011-09-04 1:51

thanks anon, it worked! you mind elaborating on what i did wrong?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List