c++ reading an array char from a text file : I got a function :

    uintptr_t FindPattern(HANDLE hProcess, uintptr_t start, uintptr_t end, char *pattern, char *mask);

when i call it like this, it's OK :

    uintptr_t found = FindPattern(hProcess, START, END, "\x89\x41\x24\xE9\x00\x00\x00\x00\x8B\x46\x00\x6A\x00\x6A\x00\x50\x8B\xCE\xE8", "xxxx????xx?xxxxxxxx");

now, i'm storing pattern and mask in a text file, reading these as string and convert them back to char, but it's no more working :

    char* tmp1 = new char[pattern.length() + 1];
    strncpy(tmp1, pattern.c_str(), pattern.length());
    tmp1[pattern.length()] = '\0';
    
    char* tmp2 = new char[mask.length() + 1];
    strncpy(tmp2, mask.c_str(), mask.length());
    tmp2[mask.length()] = '\0';
    
    uintptr_t found = FindPattern(hProcess, START, END, tmp1, tmp2);
    
    delete[] tmp1;
    delete[] tmp2;

for what i see, mask is OK but i got a problem with pattern.
i think i have to suppress "\" or maybe doubling them ("\\\").
