Link to home
Start Free TrialLog in
Avatar of NJordan72
NJordan72

asked on

convert string to unsigned char *

Hello-

I have a function that takes an 'unsigned char *' as a value.  This is data that I'm passing the functin to be worked on.  Unfortunetly prior to using the function I only have this data stored as a string (or char *).  

Is there a simple way to convert the strgin to an 'unsigned char *'?  Thanks.

ASKER CERTIFIED SOLUTION
Avatar of jhance
jhance

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhance
jhance

As always with a cast, be sure you understand what you're asking the compiler to do.  

In other words, make sure that such a conversion makes sense.