ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
And how about this? I have the following function header:
Code:
public : void legendreTransform (int NN,complex TotFourierTransf[][NN],complex GaussLegTransf[][NN],PhiLimits phiBounds)
{
This is what I get on compilation:
Quote:
g++ -std=c++11 sphere_perspective.cpp
sphere_perspective.cpp:551:72: error: use of parameter outside function body before ] token
public : void legendreTransform (int NN,complex TotFourierTransf[][NN],complex GaussLegTransf[][NN],PhiLimits phiBounds)
^
sphere_perspective.cpp:551:73: error: expected ) before , token
public : void legendreTransform (int NN,complex TotFourierTransf[][NN],complex GaussLegTransf[][NN],PhiLimits phiBounds)
^
sphere_perspective.cpp:551:74: error: variable or field complex declared void
public : void legendreTransform (int NN,complex TotFourierTransf[][NN],complex GaussLegTransf[][NN],PhiLimits phiBounds)
^
sphere_perspective.cpp:551:74: error: expected ; at end of member declaration
sphere_perspective.cpp:551:82: error: GaussLegTransf does not name a type
public : void legendreTransform (int NN,complex TotFourierTransf[][NN],complex GaussLegTransf[][NN],PhiLimits phiBounds)
What is wrong with my compiler? Am I making mistakes?
I tried clang-3.5. It gave me a copious output but many lines had a proclamation: "note." So, there were errors, warnings and notes. What is the note in this context?
@NevemTeve, I need to work with complex numbers. I can invoke (use) complex numbers all right, it is the double complex that gives me trouble. I need higher precision than float complex. Spherical Harmonics that I have to use are complex functions by definition, I mean all values are complex: a + ib.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.