foo.cc: In function 'void calculate()':
foo.cc:24:5: error: 'memset' was not declared in this scope
memset(o, false, sizeof(o));
^~~~~~
foo.cc:24:5: note: suggested alternative: 'wmemset'
memset(o, false, sizeof(o));
^~~~~~
wmemset
foo.cc: In function 'void getdata()':
foo.cc:16:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
foo.cc:18:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:43:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &t);
~~~~~^~~~~~~~~~