News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Generic function

Started by RBendo, September 02, 2009, 08:08:14 PM

Previous topic - Next topic

RBendo

Hi,
i'm not english, so i don't speak english very well, i've installed Code::Blocks, and i wrote a small application which use
the functionality of the generic function:

template <class T> double IDENT () { ... }

But, when i compile the source code, the compiler don't recognize the word template.
Is possible that code::blocks don't recognize template functionality? How do I to introduce this in code::blocks
Thanks.

Riccardo

Jenna

Code__BLocks is the IDE and not the compiler.

Which compiler, OS and version of C::B dou you use ?

What's the exact error-message you get ?

If it's something like error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token you might try to use the template keyword in a c- and not c++-file.

Be aware, that a file with the ending "c" is treated as c-file. If that's the case, rename your file to cpp close C::B and restart it.