Origin C supports vector, so array usage might be not well tested and thus more likely to have bugs,
Try the following instead,
vector<string> channels = {"str1", "str2", "str3", "str4"};
for(int num = 0; num < channels.GetSize(); num++)
{
printf("Channel[%i]: %s\n", num, channels[num]);
}
I tested in Origin75 SR5 and sure enough, there was a bug with string array initialization. I tried in our in house current code build and problem seemd fixed, so in future release, this bug should be gone. But in general, it is much better to use vectors in Origin C.
CP
Edited by - cpyang on 02/17/2005 10:41:40 AM