Download MetaTrader 5
To add comments, please log in or register
Unable to find the answer to your question? Use the search!
eugenio
57
eugenio 2014.03.17 22:14 

I have write a function in a library module in this mode with array that must be returned as reference

template<typename T>
void getDataSeries( T &array[], string symbol, int dataType, int timeFrame, int numberData, datetime time )

but when I import function in my indicator or expert in this mode

#import "myLib.ex4"
	void getDataSeries1( T &array[], string symbol, int dataType, int timeFrame, int numberData, datetime time );
#import

I recive this error message

'T' - declaration without type

how do I import this type of function?

If I write this function in a include file, the array does not return as a reference

Thanks for help

Ovo Cz
2955
Ovo Cz 2014.03.18 06:03  

You can use the generic T type only in the function following the declaration line.

Arrays are passed as a reference in every case, so not sure what you meant.

/
To add comments, please log in or register