Problems with fstream
Problems with fstream
- Subject: Problems with fstream
- From: Paulo Ferreira <email@hidden>
- Date: Mon, 9 Jun 2008 18:26:03 -0700 (PDT)
Hello everyone!
I'm facing a little problem with my Xcode3.0.
I was programming an C++ application in Xcode, and on it I was using fstream.h to open a .txt file. The code is bellow:
#include <iostream>
#include <fstream>
using namespace std;
int main(){
cout << "Loading File..." << endl;
ifstream fin("pontos.txt");
if(!fin) cout << "ERROR! Could not open the file!" << endl;
else{
cout << "Start loading the file" << endl;
int x, y, z;
while(fin >> x >> y >> z){
cout << "\nX value: " << x << "\nY value: " << y << "\nZ value: " << z;
}
cout << "End load file." << endl;
fin.close();
}
return 0;
}
I tried to chage the pontos.txt to pontos.cpp, but it didn't work =P ... yes, the pontos.txt and pontos.cpp are in the project.
SO, does someone has any idea how to solve this problem?
Thanks,
Paulo.
Abra sua conta no
Yahoo! Mail, o único sem limite de espaço para armazenamento!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden