Thanks for your quick reply, i get an error whilst compiling though.

Heres my code:
<code>

#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;

int main()
{
ifstream diagram;
diagram.open("diagram.in");
string line;
int one;
int two;
getline(diagram, line);
one = atoi(line);
getline(diagram, line);
two = atoi(line);
system("PAUSE");
return 0;
}

</code>

The error i get is the following: error C2664: 'atoi' : cannot convert parameter 1 from 'std::string' to 'const char *'



- Neil.