fork download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. class Node
  6. {
  7. public:
  8. Node *next;
  9. char Variable_name[32];
  10. };
  11.  
  12. void Test( Node ** ret )
  13. {
  14. Node *temp = new Node;
  15. temp->next = NULL;
  16.  
  17. strcpy( temp->Variable_name, "counter" ) ;
  18.  
  19. *ret = temp;
  20.  
  21. } // end void
  22.  
  23.  
  24. int main()
  25. {
  26. Node *Variable_list_head = NULL ;
  27.  
  28. Test( &Variable_list_head ) ;
  29.  
  30. cout << Variable_list_head << endl;
  31. cout << Variable_list_head->Variable_name << endl;
  32.  
  33. return 0 ;
  34. } // end main()
  35.  
Success #stdin #stdout 0.02s 2856KB
stdin
Standard input is empty
stdout
0x95d1008
counter