The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 silly problem with lstrcat

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
5*10 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 canīt 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);
}

3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess 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
5*10 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 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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000