Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B
Generic function
(1/1)
			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 
--- Code:  ---error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
--- End code ---
 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.
		
Navigation
[0] Message Index
Go to full version