ifstream ubuntu doesn't read

Hi!
I have a very simple question for a simple code.
Why doesnt it read the content of my file? I use ubuntu 9.04, the file is in the same folder as the source and the executable...

it works well on windows.

#include<iostream>
#include<fstream>

using namespace std;
int main()
{
ifstream in("file.txt");
string buf,line;
while(getline(in,line))
buf+=line;
cout << buf << endl;
}



thanks for the answers.
Topic archived. No new replies allowed.