Просто добавьте что-то примечательное здесь.
myQueue.hpp:
template <class T>
class QueueA {
int size;
...
public:
template <class T> T dequeue() {
// implementation here
}
bool isEmpty();
...
}
myQueue можно определить методы шаблонного класса, которые просто прекрасны в файле реализации. cpp:
// implementation of regular methods goes like this:
template <class T> bool QueueA<T>::isEmpty() {
return this->size == 0;
}
main()
{
QueueA<char> Q;
...
}
Это сложно. В принципе, идея - это неволю и повторный поворот, но с завихрением:
select t.id,
max(case when which = 'codeTaxe1' then val end) as codeTaxe1,
max(case when which = 'codeTaxe2' then val end) as codeTaxe2,
. . .
from t cross apply
(select v.*, row_number() over (order by (select null)) as seqnum
from (values (t.codeTaxe1, 'codeTaxe1'), (t.codeTaxe2, 'codeTaxe2'), . . .
) v(val, which)
where val is not null
) tt
group by t.id, seqnum;