BLEService Formatting

I am trying to create a peripheral service. I want to use an array but I get a strange error:

for (byte s = 0; s < pservCount; s++) {
  BLEService pService[s](pServUUID.c_str());

exit status 1
array must be initialized with a brace-enclosed initializer [-fpermissive]

If I replace the index element with a hard-coded number (or just remove the index) then it compiles. I would appreciate any recommendations - thanks.

  • Fred

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.