I need to read out a file, analysis and store difference data in CSting and Int. I create an ArrayList but how can I store both CString nd Int to that ArrayList? Or how can I convert CString to String^
and so I can store them into an ArrayList?
I don't understand that ArrayList can store object but why a CString do not count as object?
CString supports certain implicit conversions, so you can simply pass the CString object as the parameter to the System::String constructor. Depending on whether you're doing a Unicode or MBCS build, it will match either of two out of the three one-parameter constructor oveloads of System::String. See How to: Convert Between Various String Types, a really helpful MSDN page that, BTW, turned up right at the top of the results of a simple MSDN search for CString.
Is there any specific reason why you're mixing MFC and C++/CLI?
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.