Does anyone know how to convert a char array to a LPCTSTR in c?
Edit:
For more reference, I need to add an integer to a string then convert that string to LP
"Does anyone know how to convert a char array to a LPCSTR in c?"
You don't have to do anything at all. It automatically converts to that type (except in initializers and sizeof).
"CreateFile(portName..."
Perhaps you should tell us the error message that VC++ gives you at compile time?
Perhaps you should also tell us what error message VC++ gave you when Adam Rosenfield's whcar_t version didn't work for you?