Read from input file

Hello, I am trying to read from this input file:

0 0
0 1
1 1
1 0

This is what i have so far, i am using an array to obtain the info:

#include <iostream>
#include <fstream>
#include <sstream>
#include <cmath>
#include <ctime>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <algorithm>

using namespace std;
const int W_WIDTH = 80;


///
/// Main Function
///

int main(){
fstream input_file; ///< Input file stream
string input_filename; ///< Input file name
double perimeter = 0; ///< Area of the polygon
double area = 0; ///< Perimeter of the polygon
double temp = 0;

//prompt for input filename
cout << "Enter the input filename: ";
getline( cin, input_filename );
cout <<


//open input file

input_file.open(input_filename.c_str());


//Validate the filestream
if( input_file.fail() ){
cerr << "Input file is invalid.\n";
return 1;
}



double pointer[4][2];
int i;
int j;


for(int i = 0; i < 4; i++){
for(int j = 0; j < 2; j++){
pointer[i][j] = 0;

input_file >> pointer[i][0]
>> pointer[i][1];

}
}


[/code]
So... what isn't working?
Topic archived. No new replies allowed.