what is way to use array in qt like c ?
-
How to use below type of array in qt class.
how to declare it in header file ?
how to initialize it in constructor of qt ?
int arr[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; -
Since it's a fixed size array, just declare it with the right size and then initialize it in the constructor.
-
Hi,
Qt is a C++ framework so there's nothing special to be done.
Declare the variable as member of your class and initialize the way you need it in the constructor.
Note that you may want to use a container like a QVector or std::vector to store your data depending on what you are going to do with it.
What are you going to use it for ?
-
Hi,
Qt is a C++ framework so there's nothing special to be done.
Declare the variable as member of your class and initialize the way you need it in the constructor.
Note that you may want to use a container like a QVector or std::vector to store your data depending on what you are going to do with it.
What are you going to use it for ?
i want to use this array to find moving average of 15 data which comes from i2c device
-
Since it's a fixed size array, just declare it with the right size and then initialize it in the constructor.