/in/foo.cc:9:7: error: ISO C++ forbids declaration of 'init' with no type [-fpermissive]
init()
^
/in/foo.cc: In member function 'int segtree::init()':
/in/foo.cc:12:2: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/in/foo.cc: In member function 'void segtree::build(int, int, int)':
/in/foo.cc:20:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=lx+rx>>1;
~~^~~
/in/foo.cc: In member function 'int segtree::query(int, int, int, int, int)':
/in/foo.cc:31:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=lx+rx>>1;
~~^~~