What data types to use?

So, I tried to make an array of strings and was presented with tons of array/string types. Are there any documents referring in which case what should I use? Like i should use c++ array/pointer/DynArray/DataBlock/CryString/std::string/etc ? I have found one for 5.2, but I'm on 5.5p6 and there are some types that already non-existent, and some new types.

Re: What data types to use?

This is down to your data design.
The container you use and how you interact and pass around this container to different objects.

If your strings in this array have a fixed length/known length at compile time, then using something like a reserved size vector would be most efficient to store the strings.
If the strings are local to objects that will lookup and use the strings each time they update, then having a vector of pointers where the data is stored in the class itself could be most beneficial.

The strings themselves should ideally use CryString so they make use of our customized logic/memory allocator, unless you want to specifically use the default allocator, then you would use std::string.
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 3 guests