hi masters!!
can anyone plese help me in this?
i want to pass an ifstream object to function.
please dont suggest me to use istream instead!!!!!!!
i know it can b passed by reference, but i am not been able to do that!!
my code
Code:#pragma warning(disable:4786) #pragma warning(disable:4996) #include <vector> #include "common.h" #include "defFile.h" #include<uf.h> #include <iostream> #include <uf_part.h> #include <uf_curve.h> #include"runner_blade.h" using namespace std; void defFile::readFile(char *DefFileName) { char buf[256]; int i=0,j=0; ifstream inpfile; inpfile.open(DefFileName); while(!inpfile.eof()) { inpfile.getline(buf,256,'\n'); if(strstr(buf,"action")) { //I'm check whether the string action is coming or not inpfile.getline(buf,256,'\n'); sscanf(buf,"%d %d",&ActionSide.NumberOfSections,&ActionSide.NumberOfPoints); readLine(ActionSide.NumberOfSections,ActionSide.NumberOfPoints,ifstream &inpfile); } } inpfile.close(); }
error:
1>d:\backup_qi-287\geconfidential\rajesh\hitachi_runner_blade\cod e_runner_blade\runner_blde\runner_blde\deffile.cpp (28) : error C2275: 'std::ifstream' : illegal use of this type as an expression



LinkBack URL
About LinkBacks


