i am using visual C++ 2010 i m having just one error i want user to enter inputs model and color and then it will pass to a public variable and public member function will access private data members and assign values to it then a public member function will display those values main.when i try to write s1.colr[10] to pass it to fuunction it gives error.
s1.colr[10] is past the end of your array; the valid elements are s1.colr[0] to s1.colr[9].
It doesn't seem like you understand how arrays work; I recommend re-reading whatever material you are using to learn since you try to use s1.colr[10] to refer to, apparently, "the whole array" in many places, which does not work.