![]() |
error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double'
Hi all C++ experts,I am new in C++ & got an
error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double' . please anyone help me out fron this problem & please tell me something about this whitch help me in future. Thanks Code:
|
Re: error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double'
The error is actually quite clear. F_Ite takes doubles (according to the function prototype), and you're passing in double arrays.
Also your prototype doesn't match the function itself. Here's your prototype: Code:
void F_Ite(double,double,double,double,double,double);Code:
void F_Ite(double *a, double *b, double *c, double *d, double *Fc, double *Fd)Also there is an error on this line: Code:
using namespace std; // you should not use this statement.Also bollocks, although it's amusing that you have global data declared immediately after this false statement: Code:
// never ever declare global data in C++I agree with the comment, but why then is it in the code? Code:
system("pause"); // this is a platform specific call. do not use this.Code:
//return 0;Code:
void F_Ite(double *a, double *b, double *c, double *d, double *Fc, double *Fd)Code:
for(int k=1;k<(NI-1);k++) |
Re: error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double'
So when faced with an error you don't understand, think about the LITERAL meaning of EXACTLY what it says. Usually you'll find that most errors are written in pretty plain language. They mean you've done something wrong, so you have to accept that and work out what it is that you've done wrong. Often failure to understand errors comes from the (wrong) conviction that you've done nothing wrong and the compiler doesn't know what it's talking about, and that is not a useful starting point.
|
Re: error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double'
Quote:
|
| All times are GMT +5.5. The time now is 07:43. |