Main.cc: In function ‘int main()’: Main.cc:9:5: error: ‘scanf_s’ was not declared in this scope scanf_s("%d %d", &n, &q); ^~~~~~~ Main.cc:9:5: note: suggested alternative: ‘scanf’ scanf_s("%d %d", &n, &q); ^~~~~~~ scanf