🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #225

C++ construtor problem

#225
From: Mr D. Vladicic
Date: Wed, 09 Sep 1992 01:16
44 lines
1684 bytes
Iam a final year computer science student currently working on a
c++ project.  The problem i have is that when i make my program
i get the following message

ld:
Undefined:
_$_4User
collect: /usr/bin/ld returned 1 exit status
*** Error code 1


i have linked the program to all its components e.g User 
the program  will compile except it wont give executable
permission to the final object code.

	When i change mode the program will complete all its tasks 
	till it finishes at which point it gives a segmentation fault

WHAT I  would like to KNOW is what causes the error is it the User constructor
or is it something else
		example of the constructor is provided below

		User::User(String& user_name,String& password)
{
       	
        person= new Personal;  // simple struct 
        if (!Check_password(user_name, password))
                {
                        cout<<" you bombed" << endl;
                        exit(1);
                        //give an error message and abort
                        
                }


          Finances=new Financial(user_name);     
          History=new Tipping_History(user_name);
}
			
		any assistance would be greatly appreciated

				int401a@mdw045.cc.monash.edu.au
				Dragan Vladicic
Technical Details
Message-ID: <1992Sep9.011632.29931@monu6.cc.monash.edu.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!mukluk!int401a

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.help
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!mukluk!int401a
From: int401a@mdw045.cc.monash.edu.au (Mr D. Vladicic)
Subject: C++ construtor problem  
Message-ID: <1992Sep9.011632.29931@monu6.cc.monash.edu.au>
Sender: news@monu6.cc.monash.edu.au (Usenet system)
Organization: Monash University
Date: Wed, 9 Sep 1992 01:16:32 GMT
Lines: 44