So i was experimenting with structure arrays today just to kind of review a little. ( i'm fairly new to c++ ) Anyway, I made an array of structures and initialized two of it's elements ( did i say that right? ). I wanted to see if i could modify an element of the array after initialization and i don't think i did it right. So that's kind of the first thing i need help on, various ways to modify the elements.
Then the next question i have is when i tried to do:
collection[2].title = "one piece";
I realized that i didn't know how to assign a string to a char array other then how you would do it with an initialization. ( or the cin input )
like i knew this worked:
char RandomArray[20] = "Hi!"
but what if i declared it and then wanted to modify the char array? would i have to assign a single character to each array element separately? There has to be a better way than that right? ( i know i can use the string object but i want to make sure i have arrays down good)
Okay, thanks, that helps a lot! But one more thing, visual studio is telling me that strcpy is ambiguous and i should use strcpy_s instead, what is that all about?