Author |
Topic  |
|
5*10
Germany
Posts |
Posted - 09/12/2005 : 10:12:19 AM
|
Origin Version (Select Help-->About Origin): 7G SR4 v.7.0552 Operating System:win2k
Ok, know a real silly question, but I cant find the reason of this problem:
I'm allways using the lstrcat function to compound two or more string values. It works several times, but in my current function it doesn't work. The following function gets my system break down. Ican not understand this. I try to solve the problem by reading in the manual but I get no hint. Then I debugg the programm and during the last lstrcat-command the system break down whether how many lstrcat commands are called. The funny thing is, that in an other programm the same lstrcat function works. Has anybody have this problem?
greets 5*10
void test() { string test1=""; string test2="Das"; string test3="0001"; string test4="schei"; out_str(test1); strcat(test1, test2); out_str(test1); strcat(test1, test3); out_str(test1); strcat(test1, test4); out_str(test1); }
|
|
Mike Buess
USA
3037 Posts |
Posted - 09/12/2005 : 11:02:03 AM
|
In Origin 7.5 SR5 I get the "Error, function call and declaration mismatch" compiler error for the first strcat line of your function. This compiles and works fine even in 7.0 SR4...
void cattest() { //string test1=""; char test1[80]; string test2="Das"; string test3="0001"; string test4="schei"; out_str(test1); strcat(test1, test2); out_str(test1); strcat(test1, test3); out_str(test1); strcat(test1, test4); out_str(test1); }
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 09/12/2005 11:04:33 AM |
 |
|
5*10
Germany
Posts |
Posted - 09/13/2005 : 03:17:50 AM
|
Thank you for this message! It works. But a general question:
Is there any reason, why the lstrcat command works well in another part of my OriginC programm!
greets 5*10
|
 |
|
Mike Buess
USA
3037 Posts |
Posted - 09/13/2005 : 07:20:34 AM
|
If you look at the remarks for lstrcat in the programming guide you'll find that strcat is its alias... so they are the same function.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 09/13/2005 07:21:27 AM |
 |
|
|
Topic  |
|