hi guys, i am an extreme extreme extreme beginner to c++. im trying to get my program to create a file with my own extension and write data to it, but i keep getting the error; "cannot add two pointers' in line 17
please can you check my code, and identify my problem;
Don't say can't since it's technically possible. It would require concepts the OP is probably not familiar with yet and redundant coding of something better implemented elsewhere. But yes, the links given will help with a solution.
To be clearer, entire arrays can't be passed by value. Yet, the code isn't trying to do that either, as shown by the error cannot add two pointers. Just saying it can't be done is like telling the string class it can't do what it does. Impossible? no. Requiring an overly convoluted process that isn't usually necessary? Yes.
You can't overload operators for non user-defined types ( eg classes )
You never can use operators for arrays, you can use operator for classes defined to be similar to arrays (eg std::string)