-10

why I added cerr debug points in .cc file, but it never print out when I run it, where could it possibly be manipulated and by what files?

Thanks!

Ann W.
  • 27
  • 1
  • 7
  • 3
    Please **[edit]** your question with a [mcve] or [SSCCE (Short, Self Contained, Correct Example)](http://sscce.org) and include the full error text. – NathanOliver Jul 06 '16 at 17:40
  • 4
    You named it `Span`, not `span`. Also, it has _one_ template argument, not two. – tkausl Jul 06 '16 at 17:42
  • 2
    c++ is case sensitive for any symbols you use. – πάντα ῥεῖ Jul 06 '16 at 17:48
  • 2
    You need to pick up a [good book on C++](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list). – Captain Obvlious Jul 06 '16 at 17:50
  • @AnnW. `template`... T is being declared twice. Make the second T another name, e.g. U. `template` if you really need a second type. – David Thomas Jul 06 '16 at 18:00
  • Thanks, why I added cerr debug point in xxx.cc, but it never print out when I run the project? http://stackoverflow.com/questions/38519332/why-compile-into-old-so?noredirect=1#comment64456431_38519332 – Ann W. Jul 24 '16 at 06:50
  • Don't change a question to something completely different after it has been answered! – caps Aug 25 '16 at 15:03

1 Answers1

4

First of all, your type is named Span, not span. Names are case-sensitive in C++. Secondly, your Span template takes two template arguments, while you provide only one. This works:

Span<int> ageSpan;