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
 Looking for help on the complex constructor usage

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
liuweitao Posted - 02/06/2007 : 6:02:08 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System: WinXP

I'm writing a fitting function involving some complex variables. A section of my code looks like this:

...
double dTmpdnr3=dnr(...);
double dTmpdk3=dk(...);

complex cTmpcn3(dTmpdnr3,dTmpdk3);
complex cnvac(1,0);
complex cTmpcns3=cnsurface(cTmpcn3);
...

During the compling an error message popped out regarding the line in red, which reads "Error, General Error ( Default constructor may have only one argument ) contact TD.". I have no idea what to do with this, since the "complex" constructor definitely allows two arguments, and the same code worked properly eleswhere. Could anybody help me on it? Thanks a lot!

Weitao
2   L A T E S T    R E P L I E S    (Newest First)
liuweitao Posted - 02/06/2007 : 7:39:43 PM

Indeed I'm working with an SR2... I'll try that out, thank you!

Weitao

quote:

Hi Weitao,

I pasted your code into an arbitrary (custom) fitting function and replaced the functions dnr(), dk() and cnsurface() with constants. The function compiled with no errors in Origin 7.5 SR6. However, when I tried the same in Origin 7.0 SR4 I got the same errors that you reported. The complex constructor also takes two arguments in 7.0 so I'm not sure why the error occurs. However, it looks like you can fix it by updating your Origin 7.5...
http://www.originlab.com/index.aspx?s=9&lm=76

Mike Buess
Origin WebRing Member

Mike Buess Posted - 02/06/2007 : 7:17:57 PM
Hi Weitao,

I pasted your code into an arbitrary (custom) fitting function and replaced the functions dnr(), dk() and cnsurface() with constants. The function compiled with no errors in Origin 7.5 SR6. However, when I tried the same in Origin 7.0 SR4 I got the same errors that you reported. The complex constructor also takes two arguments in 7.0 so I'm not sure why the error occurs. However, it looks like you can fix it by updating your Origin 7.5...
http://www.originlab.com/index.aspx?s=9&lm=76

Mike Buess
Origin WebRing Member

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