C++ Converting a char to a const char *
c++, char, pointers
Solution
char a = 'z';
const char *b = &a;
Of course, this is on the stack. If you need it on the heap,
char a = 'z';
const char *b = new char(a);
Problem
I'm trying to use beginthreadex to create a thread that will run a function that takes a char as an argument. I'm bad at C++, though, and I can't figure out how to turn a char into a const char , which beginthreadex needs for its argument. Is there a way to do that? I find a lot of questions for converting a char to a const char, but not to a const char *.