treearray.cpp:52:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
treearray.cpp: In function 'int main()':
treearray.cpp:57:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &v, &u);
~~~~~^~~~~~~~~~~~~~~~
treearray.cpp:62:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
treearray.cpp:67:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &type);
~~~~~^~~~~~~~~~~~~
treearray.cpp:69:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &x, &v);
~~~~~^~~~~~~~~~~~~~~~
treearray.cpp:73:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&l, &r, &v);
~~~~~^~~~~~~~~~~~~~~~~~~~~