What is wrong here

Hi I have this small code but it produce a wrong result:
#include <Long.h>
#include <String.h>

int main () {
SysString tmp;
int32 j=100;
tmp.assign((int32)j,(unichar*)("value=%d"));
Console::put(tmp);
}
(it is using isip production system library http://www.isip.piconepress.com/projects/speech/software/documentation/)
The expected result is : value=100
but it produce some junks
now if I change the code into:
#include <Long.h>
#include <String.h>

int main () {
SysString tmp;
int32 j=100;
tmp.assign((int32)j,(unichar*)(L"value=%d"));
Console::put(tmp);
}

(unichar is equal to wchar_t)
Everything works just fine, I want to know why this is happening?

thanks

Last edited on
Topic archived. No new replies allowed.