PDA

View Full Version : a C++ problem


babyboss
March 18th, 2008, 02:42 PM
I have a few lines of code like the following:

template <typename DataType>
inline DataType Digraph<DataType>::data(int k) const{
return myAdjacencyLists[k].data;
}

After I compiled it, the compiler keeps complaining "Error: expected initializer before '<' token " in the inline DataType line.

Thank you

meatpan
March 25th, 2008, 11:59 AM
Can you provide some more context regarding your program? List the include files, compilation command, etc.... Also, if you want a faster answer, consider posting in the 'Programming Talk' forum.