0

I want to write a function NewPrint similar to swprintf() where the first parameter(bufferX) gets filled with the contents of the second parameter(text) . This works well in the function itself but when I use this function in main the parameter BufferNew does not get the value of tNew. What am I doing wrong?

int NewPrint(char16_t*  bufferX,  char16_t* text)
{
    bufferX = (char16_t* )text;
    return 9;
}

int main()
{
    char16_t bufferNew[100];
    char16_t tNew[100] = u"This is the text to be printed";
    int retNew;
    retNew = NewPrint(bufferNew,  tNew);   
}
user3443063
  • 1,295
  • 4
  • 19
  • 30

0 Answers0