serotonidze (serotonidze) wrote in computerscience,
serotonidze
serotonidze
computerscience

question in code

wrote some function to show all the cars which are in the parking lot, but I don't know why it works only till 2 cars. May you can help me to find it out why.

This is the function:

void Cars(Car *caris,int fuko){


cout<<"fuko"<
[Error: Irreparable invalid markup ('<fuko<<endl;>') in entry. Owner must fix manually. Raw contents below.]

wrote some function to show all the cars which are in the parking lot, but I don't know why it works only till 2 cars. May you can help me to find it out why.

This is the function:

void Cars(Car *caris,int fuko){


cout<<"fuko"<<fuko<<endl;

*(caris+fuko)=*caris;

for(int r=1;r<=fuko;r++){

((caris+r))->show();}
}

that's the way I call it:
Cars(&car_data,car_data.get_counter());

this is the definition of her: void Cars(Car *,int);

Thank you.


<a href="http://tinypic.com" target="_blank"><img src="http://i30.tinypic.com/15rjpy9.jpg" border="0" alt="Image and video hosting by TinyPic"></a>


the picture of that:
http://i30.tinypic.com/15rjpy9.jpg
  • Post a new comment

    Error

    default userpic
  • 2 comments