Danny Kalev <dannykk@inter.net.il> wrote:
>first of all, if you want to create an array of elements, data should
>be declared
>
>type *;
>
>Secondly, allocate it as usual:
>
>Vector::Vector(int size)
>{
> if (size>0)
> type = new type[size];
>}
>
>Danny


>Aleks wrote:
>>
>> Please,
>> tell me why this code isn't right:
>>
>> template<class type>
>> class Vector{
>> type (*data)[];
>> ...
>> public:
>> //here will be constructor&destructor
>> ...
>> // error appears in this place
>> type* operator[](int i){return data[i];}
>> };
>>
>> And one more question:
>> How to allocate 'data' ?
>>
>> Thank you.


how can i write something with definewich will be dinamic, wich i could
replace in process
example
#define a(x) x*x

int d;
d=5;
a(d);