I want to do something like this
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
MyFunc("test");
return 0;
}
void MyFunc(const char* Filename)
{
cout << strcat(Filename, ".tst") << endl;
}
but it tells me that my const char* cannot be used where it is expecting char*
Is the solution simply to accept it as a char* instead of a const char*? I thought it was always better to have things const if you weren't going to modify them?
Thanks
Dave