mohamad1370
دوشنبه 31 تیر 1392, 20:08 عصر
string ReadFile(string FileName)
{
string MyFile ;
string str;
string Buffer ;
MyFile = FileName;
ifstream Inpute(MyFile);
Inpute.open(MyFile);
if(Inpute.is_open())
{
while (!Inpute.eof()) {
Inpute.getline(Buffer ,255);
}
}
else
Buffer = "File is not exist";
Buffer = str ;
Inpute.close();
return Buffer;
}
مشکل کد زیر چیه که وقتی می خوام اجراش کنم پیغام خطا میده و نمیشه از string استفاده کرد.
{
string MyFile ;
string str;
string Buffer ;
MyFile = FileName;
ifstream Inpute(MyFile);
Inpute.open(MyFile);
if(Inpute.is_open())
{
while (!Inpute.eof()) {
Inpute.getline(Buffer ,255);
}
}
else
Buffer = "File is not exist";
Buffer = str ;
Inpute.close();
return Buffer;
}
مشکل کد زیر چیه که وقتی می خوام اجراش کنم پیغام خطا میده و نمیشه از string استفاده کرد.