Yes, create a member function of Trena that takes two variables, and pass in y, z to that function.
--
Mats
Printable View
Member function of Trena
Code:void fill_trena (int,int);
Code:void Metaforika::kratisi(int x,int y,int z){
train.fill_trena(2,3);
cout<<"inside kratisi: ";
cout << train.kr_dr<< endl;
Ok so far : above code prints 2.
Ok as well,above code prints 2.Code:
void Metaforika::Trena::fill_trena(int y, int z){
kr_dr=y;
cout << endl << "function: " << y << endl;
Prints 0 !!Code:void Metaforika::test() {
Trena train;
kratisi(1,2,2);
cout<<"inside test-kratisi: ";
cout << train.kr_dr<< endl;
AMEN!
Thanks a lot Mats.
You sure know how to program.