• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with fstream
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Problems with fstream
      • From: Jens Alfke <email@hidden>
  • Prev by Date: SOLVED:Objective-C: search project for text skips include'ed header file
  • Next by Date: Re: Problems with fstream
  • Previous by thread: SOLVED:Objective-C: search project for text skips include'ed header file
  • Next by thread: Re: Problems with fstream
  • Index(es):
    • Date
    • Thread