when i compiled my c++ code in linux platform (ubuntu), i got an error regarding with an array.
the error states: array must be initialized with a brace-enclosed initializer.

//source error
long long byParam[2] = "";

can anybody show me a solution on my error...thanks

Recommended Answers

All 3 Replies

longs are numbers
"" is a string constant
You can't mix the two.

thanks!

//source error
long long byParam[2] = "";

Try this instead, to initialise all elements to zero

long long byParam[2] = { 0 } ;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.