Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Studio Bluetooth

Anonymous
Not applicable

Hello,

I've been dealing with this strange problem since starting out on the CYW20719: declaring a global variable of class type leaves it uninitialized and unusable.

if I have this code for example in main.cpp:

class A {

public:

     A(int val) : a(val) { WICED_BT_TRACE("A()"); }

     int a;

}

A a = A(5);

APPLICATION_START() {

     WICED_BT_TRACE("%d\n", a.a);

}

   

The constructor of A never actually gets called. How can I fix this?

Thank you,

Nicholas

0 Likes
1 Solution
GyanC_36
Employee
250 replies posted 100 replies posted 50 replies posted
Employee

Hi Nicholas,

     Currently the WICED SDK does not fully support C++ and also we do not have any plan to support C++ in near future.

-Gyan

View solution in original post

0 Likes
4 Replies