I want to know is there something wrong in passing in passing vector reference to a function as in the example below. This code is running well and nice. But the same type of code in my project gives me crash. I don't know why.
In that case whenever I calls the function which need std::vector & . then in the called function the size of the vector reaches some millionsss....
Could you try removing all the xerces code from this function and then see. I doubt this is because of the xerces code here and nothing from std::vector.
Your do-while loop really adds nothing to the code- just executes once. So you might want to check that in case it's not what you intended. Next specifically where in SCConfig::GetAllLangugesName(std::vector<std::wstring> &outLangNames) does it cause a crash? and after how many iterations since you report getting the vector being populated.