fork download
  1. //
  2. // node.h
  3. // NodeTutorHelp
  4. //
  5. // Created by Kurtis Trego on 3/25/13.
  6. // Copyright (c) 2013 Kurtis. All rights reserved.
  7. //
  8.  
  9. #ifndef __NodeTutorHelp__node__
  10. #define __NodeTutorHelp__node__
  11.  
  12. #include <iostream>
  13.  
  14.  
  15. class node
  16. {
  17. public:
  18. // CONSTRUCTOR
  19. node(const double& init_data, node* init_link) //constructor takes two parameters when creating a new node the double that will go in the data field and a pointer to a node that will be the link.
  20. : data_field(init_data),
  21. link_field(init_link)
  22. {
  23. }
  24.  
  25. // DATA MEMBERS
  26. double data_field;
  27. node* link_field;
  28. };
  29.  
  30.  
  31.  
  32.  
  33. #endif /* defined(__NodeTutorHelp__node__) */
  34.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i486-linux-gnu/4.7/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty