首先,Them.AppCompat.Light.DarkActionBar中的默认ActionBar确实显示了,但在我使用自己的自定义工具栏后,它与地图片段重叠。
这是我的activity_main.xml
int* readFile(char* name){
FILE* file = fopen (name, "r");
if(file == NULL)
{
printf("Failed to open the file %s\n", name);
exit(1);
}
int* a = (int*) malloc(sizeof(int) * NUM_CONFIGS);
int num, i = 0;
printf("TEST1: %d\n", sizeof(a));
/* line format: CONFIG_NAME=5 */
char config_name[25];
char line[28];
while(fgets(line, sizeof(line), file)){
sscanf(line, "%[^=]=%d", config_name, &num);
a[i] = num;
i++;
}
fclose(file);
return a;
}