I am tryin to open multiple files at the same time and it wont work. The first file will open but not the second...Thanks for ur help!
see code:
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <fstream>
using namespace std;
#include "filesource.cpp"
void main()
{
ifstream infile;
infile.open("C:\\File IO Lab 2 Files\\ints2.txt");
if(infile.fail( ))
{
cout << "The File was not successfully open." << endl;
exit(1); // ends ENTIRE program!!!
}
//second file
infile.open("C:\\File IO Lab 2 Files\\ints3.txt");
if(infile.fail( ))
{
cout << "The File was not successfully open." << endl;
exit(1); // ends ENTIRE program!!!
}
}
This post has been edited by sule: 17 May 2009 - 09:03 PM

New Topic/Question
Reply




MultiQuote




|