new arg[2];
This is your problem. Remember, the number of characters you can store in a null-terminated string is size-1 meaning you only allocated enough room for 1 number. Increase your string size large enough to store your max possible value + 1, ie. 123.456 would require a string sized to 8. Also, always use charsmax() when working with strings, not sizeof().
Edit:
Quote:
Originally Posted by Doc-Holiday
for my purpose i needed it arg[4]
|
Just noticed this so I think you realized your issue.
__________________