I try to convert a wxString to a wxUInt8 number by using the "ToLong" or "ToULong" method. Here is the code: ----------------------------------------- wxString selection; unsigned long *lg; wxUint8 n;
// "selection" contains something like "45" selection = patternSequence->GetStringSelection();
if (selection.ToULong(lg,10)) n = (wxUint8)*l; ------------------------------------------
In fact the program crash with this following line: selection.ToULong(lg,10); Why?