ok i will explain better sorry for misunderstood.
in class Surviver i need to do
in header file:
-static string with 20 size.
-age
-weight at the begain
-weight at the end;
the methods in this class is:
-first methos that recive name age and the begain weight and update and putt in end weight=-1
-second methos is to update end weight ,method recive parameter and update the end weight.
-print method print the name and the begining weight;
surviver.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include<iostream>
#include<string>
usingnamespace std;
intconst size = 20;
class Surviver{
private:
char name[size];
int age;
double Bw; //begin weight
double We; //end weight
public:
Surviver(char n, int a, double e);
void CheckWeight(double w);
void print()const;
~Surviver();
};
OK, here is how you handle char[] instead of <string>, plus a small test. No problem with CheckWeight, it's your program, so it's up to you how/what functionality you have. :)