Use sprintf to format.
if IpSegment is '12', strResult will be '012'.Code:sprintf (strResult, "%03s", strIpSegment);
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 2 of 2
Threaded View
|
Click Here to Expand Forum to Full Width |