Hello and i hope that you are having a good day.
I am beginning my c++ journey. I have a dozen books and an iso specification, plus i am using the cppreference website for further research.
I have a question (which requires a bit of a description) for any cpp coders in the forum. I cannot find an exact answer to my question, so i am hoping for some guidance. I am a php coder and i use dynamic arrays and dynamic associative arrays to store dynamic/unknown data. For example, i wrote a jpeg marker and exif data scanner in php. Upload jpeg and i use the temporary file on the server to read the file. I initalize arrays to hold markers and their position in the file. I use many arrays to hold jpeg data and create associations of data so that i can display this data to the user after scanning. I am used to this dynamic data handling method in php. However, i do not yet see how this is done using cpp.
I wonder how do you handle dynamic data in cpp? if a cpp program requires a different method of storing dynamic data, then please advise. Along with this php dynamic array usage, i also have the pleasure of using string indexes to identify data easily (like a lookup table). Example: being userdata['name'] = post_name and userdata['email'] = post_email etc. Then, i can simply echo/print/printf Hello $userdata['username']. Does cpp also support string indexes somehow?
so far i've read about struct and std::vector and std::map. Any tips?
I am beginning my c++ journey. I have a dozen books and an iso specification, plus i am using the cppreference website for further research.
I have a question (which requires a bit of a description) for any cpp coders in the forum. I cannot find an exact answer to my question, so i am hoping for some guidance. I am a php coder and i use dynamic arrays and dynamic associative arrays to store dynamic/unknown data. For example, i wrote a jpeg marker and exif data scanner in php. Upload jpeg and i use the temporary file on the server to read the file. I initalize arrays to hold markers and their position in the file. I use many arrays to hold jpeg data and create associations of data so that i can display this data to the user after scanning. I am used to this dynamic data handling method in php. However, i do not yet see how this is done using cpp.
I wonder how do you handle dynamic data in cpp? if a cpp program requires a different method of storing dynamic data, then please advise. Along with this php dynamic array usage, i also have the pleasure of using string indexes to identify data easily (like a lookup table). Example: being userdata['name'] = post_name and userdata['email'] = post_email etc. Then, i can simply echo/print/printf Hello $userdata['username']. Does cpp also support string indexes somehow?
so far i've read about struct and std::vector and std::map. Any tips?