How to add strings in CStringArray object?
-
Hi All, I am using CStringArray object for adding number of strings in it. I used following code m_HTML_Page_arry->SetAt(i,strPagePath); where m_HTML_page_arry is declared as CStringArray *m_HTML_page_arry in .h file of this class. I got assertion on the above code. So if anybody have solution to this then plz forward it to me. Atul
-
Hi All, I am using CStringArray object for adding number of strings in it. I used following code m_HTML_Page_arry->SetAt(i,strPagePath); where m_HTML_page_arry is declared as CStringArray *m_HTML_page_arry in .h file of this class. I got assertion on the above code. So if anybody have solution to this then plz forward it to me. Atul
-
Hi I use Add as following way, though there is Assertion, what is the problem in this code. m_HTML_Page_arry->Add(strPagePath); Thanks in Advance Atul
-
have you allocated memory for this? m_HTML_Page_arry
Suggestion to the members: prefix your main thread subject with [SOLVED] if it is solved. chandu.
-
Hi Chandu, I did not allocate memory to m_HTML_Page_arry object. I used it directly. So can I allocate memory to it. Thanks in advance Atul
-
Hi All, I am using CStringArray object for adding number of strings in it. I used following code m_HTML_Page_arry->SetAt(i,strPagePath); where m_HTML_page_arry is declared as CStringArray *m_HTML_page_arry in .h file of this class. I got assertion on the above code. So if anybody have solution to this then plz forward it to me. Atul
Do you have something akin to:
m_HTML_Page_arry = new CStringArray;
Why are you not just using an actual object rather than a pointer to one? Most of the time, this indicates a design flaw.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Do you have something akin to:
m_HTML_Page_arry = new CStringArray;
Why are you not just using an actual object rather than a pointer to one? Most of the time, this indicates a design flaw.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
And in the end remember you must delete this object.