Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Scorpy's blog

By Scorpy, 13 years ago, In Russian

В проекте есть такие три файла:
http://pastebin.com/DFTqFqGc  (segtree.h)
http://pastebin.com/vYu1AYCa   (segtree.cpp)
http://pastebin.com/qAq8ALHi   (main.cpp)

Компилятор выводит ошибки:
c:\documents and settings\admin\мои документы\visual studio 2010\projects\segmenttree\segmenttree\seqtree.cpp(49): error C2953: 'SegmentTree' : class template has already been defined
          c:\documents and settings\admin\мои документы\visual studio 2010\projects\segmenttree\segmenttree\segtree.h(6) : see declaration of 'SegmentTree'

'max' is not a valid template type argument for parameter 'Func'

Какое слово ставить перед Func в определении шаблона и почему возникает первая ошибка?
Я же вроде бы не определяю, а только объявляю класс?

  • Vote: I like it
  • +1
  • Vote: I do not like it