At first i would like to apologize for my bad English.
Second, i have a problem with my C++ program.
I have class
Code:
class Trena {
public:
string dromologia[6];
int thesis[3];
int kr_dr;
int kr_thesis;
int change;
void initialize_t();
in a hyper class Metaforika
I set values to this with this code :
Code:
void Metaforika::Trena::initialize_t(){
dromologia[1] = "patra athina";
dromologia[2] = "patra pyrgos ";
dromologia[3] = " patra thesalloniki";
dromologia[4] = " patra lianokladi";
dromologia[5] = "athina larisa";
thesis[1] = 6;
thesis[2] = 12;
thesis[3] = 0;
BUT when i try to change the values kr_dr, kr_thesis through a function, the cannot be changed.
Code:
void Metaforika::kratisi(int x,int y,int z){
Trena train;
train.kr_dr =x;
train.kr_thesis=y;
it gives me values of "424577" ( not exactly like this )
i've trying using a constructor
Code:
Metaforika::Trena::Trena(int y,int z) {
kr_dr =y;
kr_thesis=z;
thesis[z]--;
but same thing happens.
Any help would be appreciated