lgdnpt Posted June 12, 2023 Posted June 12, 2023 How to declare an array of pointer? I am a beginner in cpp programing, I try to declare a pointer array like c#'s grammar, but it doesn't work. Please tell me how to do that and how to create a variable array, thanks!
moody_pooch Posted June 13, 2023 Posted June 13, 2023 Hi, lgdnpt! You can do it like this: Unigine::Vector<Unigine::JointWheelPtr> jointWheels; You can find more information about Unigine::Vector API in the documentation, and since Unigine::Vector works similar to std::vector and you are beginner in C++, I would recommend you to learn more about C++ STL (Standard Template Library) Containers and Iterators. I'm sure It will be really useful to you! Thanks!
lgdnpt Posted June 13, 2023 Author Posted June 13, 2023 3 hours ago, moody_pooch said: Hi, lgdnpt! You can do it like this: Unigine::Vector<Unigine::JointWheelPtr> jointWheels; You can find more information about Unigine::Vector API in the documentation, and since Unigine::Vector works similar to std::vector and you are beginner in C++, I would recommend you to learn more about C++ STL (Standard Template Library) Containers and Iterators. I'm sure It will be really useful to you! Thanks! Thanks!
lgdnpt Posted June 13, 2023 Author Posted June 13, 2023 3 hours ago, moody_pooch said: Hi, lgdnpt! You can do it like this: Unigine::Vector<Unigine::JointWheelPtr> jointWheels; You can find more information about Unigine::Vector API in the documentation, and since Unigine::Vector works similar to std::vector and you are beginner in C++, I would recommend you to learn more about C++ STL (Standard Template Library) Containers and Iterators. I'm sure It will be really useful to you! Thanks! Oh, I found my other mistake, I didn't use namespace when I declare the JointWheelPtr, thanks again, very, very thank you!
Recommended Posts