How could you convert a string into a unsigned char array?
could I use:
but what would I use instead of "%i"Code:string ReadString; usigned char ReadChar[100]; getline(File1,ReadString); sprintf(ReadChar,"%i",ReadString);
???
How could you convert a string into a unsigned char array?
could I use:
but what would I use instead of "%i"Code:string ReadString; usigned char ReadChar[100]; getline(File1,ReadString); sprintf(ReadChar,"%i",ReadString);
???
unsigned char* ptr = (unsigned char*)ReadString.c_str();
will work if you don't need to modify the unsigned char*. If you need to modify it then you'll have to allocated storage a copy the contents into an array.
zen