Thanks for your help, but I'm still getting the same error. Maybe if you saw the entire program you would see if I was doing something wrong...
Code:
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
int main()
{
ifstream ifs("border.txt");
string line;
vector<string> copy(1024);
int x=0;
while(getline(ifs,line)) {
copy[x]=line;
cout<<copy[x]<<endl;
x++;
}
cout<<"How many files do you want to update the borders for?-->";
int filenum=0;
cin>>filenum;
vector<string> files(filenum);
cout<<"Please enter the name of the file(s) you wish to convert"<<endl;
for (int y=0;y<filenum;y++){
cin>>files[y];
}
for (y=0;y<filenum;y++){
cout << files[y].c_str() << endl;
ofstream openhtml(line);
}
return 0;
}
and here is the error message if it helps:
C:\Project Data Files\Tools\onemoretry\mytool.cpp(29) : error C2664: '__thiscall std::basic_ofstream<char,struct std::char_traits<char> >::std::basic_ofstream<char,struct std::char_traits<char> >(const char *,int)' : cannot convert parameter 1 from
'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
Thanks again