I am trying to grab an input file and outfile file from the user. I can grab the input file no problem, but Dev C++ just steps right over the following line...
cin.get(ofname, 150); //grab filename from user
Here is some more of the code. Does anyone have any idea what I'm doing wrong?
#include <iostream>
#include <fstream>
#include <conio.h>
#include <string>
using namespace std;
int n=0, z=0; //declare variables to count the amount of input
int main ()
{
char ifname[150]; //declare input file name array
char ofname[150]; //declare output file name array
char key[13];
char c;
char intxt[256];
char tmptxt[5];
ifstream is; //declare ifstream to is
ofstream os; //declare ofstream to os
cout<<endl<< "Enter the path of the input file: "; //enter filename and path cin<<ifname[0]<<endl;
cin.get(ifname, 150); //grab filename from user
is.open(ifname); //open file
cout<<endl;
cout<<endl<< "Enter the path of the output file: "; //enter filename and path
cin.get(ofname, 150); //grab filename from user
os.open(ofname); //open file
cout<<endl;