the [] operator
| Alphy11 (5) | |||
| how would i make it so that i could use a function such as class class1; class1[5]; the 5 as parameters | |||
| Mitsakos (343) | |||
| You need to overload the operator [] in order to do something like that. You can read the tutorial from this site on how to overload operators. http://www.cplusplus.com/doc/tutorial/classes2.html | |||
| Evote (25) | |||
| hehehe i thought you were trying to make array of classes ooooh that would be cool class[1000000] coolness{ Public ............................ Thought i'd share that | |||
This topic is archived - New replies not allowed.
