Initialize Array string type

 

Hello,

 how can initialize an array of string? If i use command ArrayInitialize(s,".") i get error :

ArrayInitialize - no one of  the overloads can be applied to the function call.

 Thanks in advance 

 
G.M: how can initialize an array of string? If i use command ArrayInitialize(s,".")
  1. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2. void ArrayInitializeString(string& A[], string init=""){
      for(int iPos = ArraySize(A) - 1; iPos >= 0; --iPos) A[iPos] = init;
    }
    What that so hard?
 
Sorry but I do not understand how angry your answer.
According to the official documentation on the function ArrayInitialize does not seem possible to directly initialize an array of strings.

I pointed to the part of my code related to my problem:

double sprd[116], swpL[116], swpS[116];
string s[116];

..... 

ArrayInitialize(sprd, 99);
ArrayInitialize(swpL, -99);
ArrayInitialize(swpS, -99);
ArrayInitialize(s, ".");

I was wondering if you could answer the question about initialize of an array of strings with an existing function.
From your answer I assume not, but I still wonder why it is not possible.

I take the trouble.
Reason: