COPY array error-->cannot convert from 'double' to 'double []'

i occur an compile error--> error C2440: '=' : cannot convert from 'double' to 'double []' at line 13

how to amend it?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using namespace std;

# define happy__declspec (dllexport)

happy int __stdcall passValue2_dll(bool      ,double    ,double       , double[11]          ,double[11]    ,double[11]   ,double[11]   ,double[3]        ,double[11] ) ;
happy int __stdcall passValue2_dll(bool Do_SL,double bid,double spread,double Maxspread[11],double Lot[11],double SL[11],double TP[11],double Support[3],double exist[11] )
{
double Lot2[11] = {765.4,166.5,22  ,836.5,278 ,360 , 732.7 ,29.7 ,323.75,437.1,734.45} ;

//-------array copy
  for  (int i= 0; i<=11; i++)  
    {
		Lot[i]= Lot2[i]; Maxspread= Maxspread2[i]; SL[i] = SL2[i]; TP[i] = TP2[i];
  
    }
//-------array copy
}


Thnaks
Last edited on
You probably meant Maxspread[i] = Maxspread2[i];

Also don't be so afraid of putting in line breaks. Cramming multiple statements on one line just makes your code harder to read and errors like this harder to find. New lines don't cost anything.
Last edited on
oh, you are right, why i can't find out this careless mistake --> missing [i] at Maxspread [i]..

i have spent 10 minutes and can't find out where the mistake is~ ~

btw, i will type it everyline~ ~
Last edited on
Topic archived. No new replies allowed.