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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Looking for help on the complex constructor usage
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

liuweitao

USA
Posts

Posted - 02/06/2007 :  6:02:08 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 02/06/2007 :  7:17:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

liuweitao

USA
Posts

Posted - 02/06/2007 :  7:39:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

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

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000