home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13414 < prev    next >
Encoding:
Text File  |  1992-09-08  |  4.4 KB  |  165 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!mukluk!int401a
  3. From: int401a@mdw045.cc.monash.edu.au (Mr D. Vladicic)
  4. Subject: help in C++ 
  5. Message-ID: <1992Sep9.012350.1357@monu6.cc.monash.edu.au>
  6. Sender: news@monu6.cc.monash.edu.au (Usenet system)
  7. Organization: Monash University
  8. Date: Wed, 9 Sep 1992 01:23:50 GMT
  9. Lines: 154
  10.  
  11.  
  12. Iam a final year computer science student currently working on a
  13. c++ project.  The problem i have is that when i make my program
  14. i get the following message
  15.  
  16. ld:
  17. Undefined:
  18. _$_4User
  19. collect: /usr/bin/ld returned 1 exit status
  20. *** Error code 1
  21.  
  22.  
  23. i have linked the program to all its components e.g User 
  24. the program  will compile except it wont give executable
  25. permission to the final object code.
  26.  
  27.     When i change mode the program will complete all its tasks 
  28.     till it finishes at which point it gives a segmentation fault
  29.  
  30. WHAT I  would like to KNOW is what causes the error is it the User constructor
  31. or is it something else
  32.         example of the constructor is provided below
  33.  
  34.         User::User(String& user_name,String& password)
  35. {
  36.            
  37.         person= new Personal;  // simple struct 
  38.         if (!Check_password(user_name, password))
  39.                 {
  40.                         cout<<" you bombed" << endl;
  41.                         exit(1);
  42.                         //give an error message and abort
  43.                         
  44.                 }
  45.  
  46.  
  47.           Finances=new Financial(user_name);     
  48.           History=new Tipping_History(user_name);
  49. }
  50.             
  51.         any assistance would be greatly appreciated
  52.  
  53.                 int401a@mdw045.cc.monash.edu.au
  54.                 Dragan Vladicic
  55.  
  56. From: int401a@mdw045.cc.monash.edu.au (Mr D. Vladicic)
  57. Path: mukluk!int401a
  58. Newsgroups: gnu.g++.help
  59. Distribution: world
  60. Followup-To: 
  61. Organization: Monash University
  62. Subject: C++ construtor problem  
  63. Keywords: 
  64.  
  65.  
  66. Iam a final year computer science student currently working on a
  67. c++ project.  The problem i have is that when i make my program
  68. i get the following message
  69.  
  70. ld:
  71. Undefined:
  72. _$_4User
  73. collect: /usr/bin/ld returned 1 exit status
  74. *** Error code 1
  75.  
  76.  
  77. i have linked the program to all its components e.g User 
  78. the program  will compile except it wont give executable
  79. permission to the final object code.
  80.  
  81.     When i change mode the program will complete all its tasks 
  82.     till it finishes at which point it gives a segmentation fault
  83.  
  84. WHAT I  would like to KNOW is what causes the error is it the User constructor
  85. or is it something else
  86.         example of the constructor is provided below
  87.  
  88.         User::User(String& user_name,String& password)
  89. {
  90.            
  91.         person= new Personal;  // simple struct 
  92.         if (!Check_password(user_name, password))
  93.                 {
  94.                         cout<<" you bombed" << endl;
  95.                         exit(1);
  96.                         //give an error message and abort
  97.                         
  98.                 }
  99.  
  100.  
  101.           Finances=new Financial(user_name);     
  102.           History=new Tipping_History(user_name);
  103. }
  104.             
  105.         any assistance would be greatly appreciated
  106.  
  107.                 int401a@mdw045.cc.monash.edu.au
  108.                 Dragan Vladicic
  109.  
  110. From: int401a@mdw045.cc.monash.edu.au (Mr D. Vladicic)
  111. Path: mukluk!int401a
  112. Newsgroups: gnu.g++.help
  113. Distribution: world
  114. Followup-To: 
  115. Organization: Monash University
  116. Subject: C++ construtor problem  
  117. Keywords: 
  118.  
  119.  
  120. Iam a final year computer science student currently working on a
  121. c++ project.  The problem i have is that when i make my program
  122. i get the following message
  123.  
  124. ld:
  125. Undefined:
  126. _$_4User
  127. collect: /usr/bin/ld returned 1 exit status
  128. *** Error code 1
  129.  
  130.  
  131. i have linked the program to all its components e.g User 
  132. the program  will compile except it wont give executable
  133. permission to the final object code.
  134.  
  135.     When i change mode the program will complete all its tasks 
  136.     till it finishes at which point it gives a segmentation fault
  137.  
  138. WHAT I  would like to KNOW is what causes the error is it the User constructor
  139. or is it something else
  140.         example of the constructor is provided below
  141.  
  142.         User::User(String& user_name,String& password)
  143. {
  144.            
  145.         person= new Personal;  // simple struct 
  146.         if (!Check_password(user_name, password))
  147.                 {
  148.                         cout<<" you bombed" << endl;
  149.                         exit(1);
  150.                         //give an error message and abort
  151.                         
  152.                 }
  153.  
  154.  
  155.           Finances=new Financial(user_name);     
  156.           History=new Tipping_History(user_name);
  157. }
  158.             
  159.         any assistance would be greatly appreciated
  160.  
  161.                 int401a@mdw045.cc.monash.edu.au
  162.                 Dragan Vladicic
  163.  
  164.  
  165.