jeudi 16 avril 2020

Get length of unsigned char*

Hi i am trying to get the length of unsigned char*, it is a pointer to a array witch means i cant use sizeof. I cant cast it to char* then do strlen() either, seeing as it contains null bytes in the middel of the string. What other way is there to do this?

stream.open("test.txt");
stream.write((char*)c, Length of the string); // How do i find Length of the string
stream.close(); 

Aucun commentaire:

Enregistrer un commentaire