My header file is as follows:
#include <iostream>
#include <string>
#include <windows.h>
#include <math.h>
//using namespace std;
std::string StringMultiply(string Str, int Mult)
{
std::string Return;
for (int Index = 0; Index <= Mult; Index++)
{
Return += Str;
}
return Return;
}
Compiling it produces a slew of errors, most of them pertaining to the absence of a string datatype. Uncommenting the using namespace std; line fixes it, but I’ve been told this is bad practice in header files.
change
to