int main()
{
string fileBench;
string line;
cout<<"Please enter the bench file you wish to use: "<<endl;
getline(cin, fileBench);
ifstream bench ( fileBench.c_str() );
if (bench.is_open())//testing to make sure I can read the user specific file
{
while(! bench.eof())
{
getline(bench,line);
cout<<line<<endl;
}
bench.close();
}//end testing
else cout<<"Unable to open file"<<endl;
int a[] = { ????? };//not sure how to give it the right information.
vector<int> seq(a, a+sizeof(a)/sizeof(a[0]));
vector<int> lis = find_lis(seq);
This is the last step for me, so any help is greatly appreciated.
Hi, just want to confirm what you are trying to do.
I think you are trying to read a file (specified by the user) which contains a series of numbers. You then want to process that set of numbers to find the longest increasing sequence.
Currently you can open and read the file, and are outputting the file to screen to validate that.
It looks like the numbers are integers, and the file contains one number per line.