K
Kenny
Hello,
can anyone tell me how to pass an array to a function ?
I have this function , part of my class.
It works if I do not put in int a everywhere , but obviously , I need to
add an array so I can keep everything neat and tidy, And to call the array
whenever I want
thanks
kenny
void Setting::SetCylinder(int r, int h, int s, int a)
{
int value;
for (int i=0; i<count; i++)
{
cout<<" Enter a time: " <<endl;
cin>> value;
a.hours = value;
cout<<" Enter a minute: " <<endl;
cin>> value;
a.minutes = value;
cout<<" Enter a second: " <<endl;
cin>> value;
a.seconds = value;
}
}
can anyone tell me how to pass an array to a function ?
I have this function , part of my class.
It works if I do not put in int a everywhere , but obviously , I need to
add an array so I can keep everything neat and tidy, And to call the array
whenever I want
thanks
kenny
void Setting::SetCylinder(int r, int h, int s, int a)
{
int value;
for (int i=0; i<count; i++)
{
cout<<" Enter a time: " <<endl;
cin>> value;
a.hours = value;
cout<<" Enter a minute: " <<endl;
cin>> value;
a.minutes = value;
cout<<" Enter a second: " <<endl;
cin>> value;
a.seconds = value;
}
}