am I declaring my strings wrong?
I normally have no problems using strings in this manner, but this is the first time to use the .c_str() function to use a variable and two strings to create a file path for calling a file, and its giving me operational errors.
char fileName ;
char path  = "C:\\";
cout << "Please Enter the date to search for: \n"
<< "(NOTE: MUST BE IN MONTH DAY YEAR FORMAT";
cin >> fileName;
path += fileName;
fin.open (path.c_str(), ios::in | ios::nocreate);
error C2297: '+=' : illegal, right operand has type 'char '
error C2228: left of '.c_str' must have class/struct/union type
I am not overly familiar with string classes but I am reading that now, trying to understand how .c_str() function is being used with the strings I've created and why it is not happy with my code...