User forums > Using Code::Blocks

[Solved] Watches: Further expansion of structs

<< < (2/2)

Good morning Andrew,

--- Quote ---1. Update your GCC compiler if you can.
2. Update your GDB if you can.
3. Update C::B to the latest nightly (see,20.0.html forum)

--- End quote ---

First, according to Synaptics, the installed versions of both GCC and GDB are the latest versions.
Point 3. above I will hold in abeyance for the moment.

--- Quote ---After adding the pointer to the watch window do the following:

1. Select the variable by clicking once on the row
2. Right click and select the "properties" in the pop up context window
3. In the array group do the following:

* check the [X] Watch as array
* Enter the number of elements in the struct as the count
--- End quote ---

I did all this. When I then ran the program in debug/single-step mode a pop up box appeared stating that "Structure has no component named operator[].". Also, in the Watches window, the line at the bottom of the window that "hosts" pointer "theseRecords" now displays that same "Structure..." message in the middle column. Finally, the little black triangle is now missing.


Hi Andrew,

Please find attached a zip file of the (as yet unfinished/needs refactoring) project, as you initially asked for. Sorry it took me so long. Just not used to making zip files on Linux.  :(


The steps above worked for me with the latest GCC and GDB and C::B versions.

Good morning Andrew,

Since my last posting I have upgraded my system to Kubuntu 22.04 LTS. This has resulted in the updating both GCC and GDB. This, in turn, has cured the problem I was having with Code::Blocks, just as it did for you.

Many thanks for all(!) your help and patience(!).



[0] Message Index

[*] Previous page

Go to full version