Hi
I have a problem to store variable in array.I have a two String one is Array CString as[100] and second one is simple CString sw.
Now i want to store sw values in as[].How can i store?Plz help me
Thanks in Advance
Printable View
Hi
I have a problem to store variable in array.I have a two String one is Array CString as[100] and second one is simple CString sw.
Now i want to store sw values in as[].How can i store?Plz help me
Thanks in Advance
Get rid of c-type arrays.
Use MFC CStringArray class (or std::vector) instead.
I am doing like thatQuote:
Originally Posted by VictorN
But i am wrong some where becouse every time both a1[0] and a1[1] value changed. But i want to store different value in a1[0] 1nd a1[1]. If a1[0] have value then value store in a1[1].Code:CString a1[100];
CString b;
a1[0] = strFileName1;
a1[1] = strFileName1;
String b value every time change.Like this first time b="ssd" and second time b="mkkj". And i want to store value like that first time a1[0]="ssd" and second time a1[0]="ssd" and a1[1]="mkkj". Plz help me
Thanks in Advance
It wouldn't be a problem to help you if you'd help us to understand what you need, what and how you already tried it and what your problem is.Quote:
Originally Posted by anubhava
Unfortunately, the four lines of sensenless code and very poor explanation don't give us any idea...
So what is "strFileName1"?Quote:
Originally Posted by anubhava
Second, show us a small but complete example that duplicates the problem. (Just a main() program and a simple program that duplicates the problem that you're having).
Regards,
Paul McKenzie
try using CStringArray instead of a C style array.