cancel
Showing results for 
Search instead for 
Did you mean: 

I have a array declared as: char* arrs[20][30]; I have filled up this array with name and value and now I must compare for example, the first element of arrs [] value and the third element of arrs[] value. How can I do this?

cjaya.2
Associate II

I have tried to use strcmp and have also tried (arrs[0] == arrj[1][8]) with no luck. My goal is to check if the corresponding values are equal. (for reference: arrs[0] = freq :100kHz and arrj[1] = freq: 100kHz). I just wanted to see the values are equal moving from :100kHz. Any help much appreciated. Thank you

1 REPLY 1

This is basic C knowledge and is not STM32-specific. You may want to discuss it on a generic platform such as stackoverflow, and/or take some C courses.

> char* arrs[20][30];

You didn't define an array of strings, you defined a two-dimensional array of pointers.

> I have filled up this array with name and value

How?

JW