Templates and headers question

后端 未结 5 1748
迷失自我
迷失自我 2020-12-10 21:55

The compiler says it can\'t find the reference for the function when I do this:

// link.h
template 
    T *Link(T *&, T *(*)())

// link.c         


        
5条回答
  •  [愿得一人]
    2020-12-10 22:04

    Template code must be in the header. Sorry, I completely missed that! (and I thought I'd been coding C++ for years :P)

提交回复
热议问题