Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / How to convert  a wxString to a wxUint8...

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. How to convert  a wxString to a wxUint8...
#3067
Posted by: 2003-12-13 03:19:36
Hello everybody,

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?

Thank you very much,

Laurent...
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0