sirleech/Webduino

Problem compiling with template <class T>

Closed this issue · 3 comments

d3iu commented

exit status 1
'T' has not been declared

i tried declaring it as an INT T; but does not work... the error is in this line

template // no-cost stream operator as described at http://arduiniana.org/libraries/streaming/
inline Print &operator <<(Print &obj, T arg)
{
obj.print(arg);
return obj;
}

HOW TO FIX IT ?

In the code you posted, it's missing the <class T> after the template keyword. This is in the original file at https://github.com/sirleech/Webduino/blob/master/examples/Web_Demo/Web_Demo.ino

d3iu commented

i never modified the code after i downloaded it from github... something is wrong in the code, the original one, and i looked at the demo, and that line is the same ... i`l post the entire thing check it please

http://pastebin.com/3ars6GPB

d3iu commented

Found the problem, the line must be in 1 row instead of multiple lines... thats the error in the code, now its working