I am not sure if this is error in code or I am doing something wrong in code::blocks. I have array
I am saving values to the files[count].name and files[count].filename and I want to check the values which I have in the array files. But I don't see it in the window. I type *files and I see only the first element files[count] but not the rest of the elements. So what to do to watch it complete? With all 256 elements?
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
typedef struct {
char * name;
char * filename;
} FILES;
FILES files[256];
int readFiles(FILES * files)
{
char * nameTmp;
nameTmp = "gaussian";
int count = 0;
files[count].name = (char*) malloc( sizeof(char)*256 );
files[count].filename = (char*) malloc( sizeof(char)*256 );
strcpy(files[count].name,nameTmp);
count++;
files[count].name = (char*) malloc( sizeof(char)*256 );
files[count].filename = (char*) malloc( sizeof(char)*256 );
strcpy(files[count].name,nameTmp);
}
int main()
{
readFiles(files);
return 0;
}
Also is there any shortcut or hotkey to edit the existing item in Watches? I often want to change from files to *files or something and it is uncomfortable to do it through context menu; it would be much better just to press f2 for rename.