Hi DeHF,
In your code there is no definition for get_name() and get_salary() function, no initialization in constructor. I modified as below and its behaving fine as u expecting,

#include <iostream>
#include <string>

using namespace std;

class PEmployee
{
public:
    //PEmployee();
    string Name;
    double Salary;
    //Initialization of variable in constructor
    PEmployee(string employee_name, double initial_salary)
    {
        Name = employee_name;
        Salary = initial_salary;
    }
    void set_salary(double new_salary);
    double get_salary() const;
    string get_name() const;
private:
    //Person person_data;
    double salary;
};

//Function definition
double PEmployee:: get_salary() const
{
    return Salary;
}
//Function definition
string PEmployee::get_name()const
{
    return Name;
}

int main()
{
    //PEmployee f;
    PEmployee f("Patrick", 1000.00);
    cout << f.get_name() << " earns a salary of "
        << f.get_salary() << endl;
    return 0;
}
WaltP commented: Thank you for finishing his homework for him. Hope you get a good grade. -3

[QUOTE=Lasbunter;1396851]have duty make a program bank with C++
that program can :
create new account
withdraw
deposit
balance
transfer

but I am confused where to start?

please help me !![/QUOTE]

Hi Lasbunter,

This will help you. Change with your requirements.

[CODE]

include <graphics.h>
include <dos.h>
include <iostream.h>
include <fstream.h>
include <process.h>
include <string.h>
include <stdlib.h>
include <stdio.h>
include <ctype.h>
include <conio.h>
include <dos.h>
void gra1();
void gra2();            //Program segment to display some graphic
void box(int,int);

//**********************************************************
// THIS CLASS CONTAINS FUNCTIONS RELATED TO DRAW BOX ETC.
//**********************************************************

class shape
{
public : //Public member functions
void line_hor(int, int, int, char) ;
void line_ver(int, int, int, char) ;
void box(int,int,int,int,char) ;
} ;

//**********************************************************
// THIS CLASS CONTROL ALL THE FUNCTIONS IN THE MENU
//**********************************************************

class control
{
public :
void main_menu(void) ; //Public member functions
void help(void) ;
private :
void edit_menu(void) ; //Private member functions

} ;

//**
// THIS CLASS CONTAINS FUNCTIONS RELATED TO INITIAL DEPOSIT
//**

class initial
{
public :
void add_to_file(int, char t_name[30], char t_address[60], float) ;
void display_list(void) ;
void delete_account(int) ;
void update_balance(int, float) ;
void modify(void) ;
int last_accno(void) ;
int found_account(int) ;
char return_name(int) ; //So that the private members of class
char
return_address(int) ; //can be used in required segments.
float give_balance(int) ;
int recordno(int) ; void display(int) ;
private :
void modify_account(int, char t_name[30], char t_address[60]) ;
void box_for_list(void) ;

      int   accno ;                  //Private member elements
      char  name[30], address[60] ;
      float balance ;

} ;

//**
// THIS CLASS ...

geojia commented: http://www.daniweb.com/forums/thread78223.html +0
jonsca commented: Non-standard code and read the rules!!! -1
elsiekins commented: dont give out code ! you have just done their work for them they will never learn +0
__avd commented: That is not help. -2