home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / g / help / 1205 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.6 KB  |  55 lines

  1. Newsgroups: gnu.g++.help
  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: C++ construtor problem  
  5. Message-ID: <1992Sep9.011632.29931@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:16:32 GMT
  9. Lines: 44
  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.