fork(1) download
  1. /**********************
  2.  * Node.h
  3.  * *******************/
  4. #ifndef _NODE_H_
  5. #define _NODE_H_
  6.  
  7. template< class Container >
  8. class Node
  9. {
  10. private:
  11.  
  12. Container configuration;
  13.  
  14. public:
  15. template< class Container >
  16. friend ostream& operator<<( ostream& out, const Node< Container >& node );
  17. };
  18.  
  19. #endif
  20.  
  21. /***************************
  22.   * Node.cpp
  23.   * ************************/
  24.  
  25. #include "Node.h"
  26.  
  27. //explicit instantiation
  28. template Node< StringContainer >;
  29. template Node< IntegerContainer >;
  30.  
  31. template< class Container >
  32. friend ostream& operator<<( ostream& out, const Node< Container >& node )
  33. {
  34.  
  35. out << node.configuration;
  36.  
  37. return out;
  38. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:25:20: fatal error: Node.h: No such file or directory
   #include "Node.h"
                    ^
compilation terminated.
stdout
Standard output is empty