Click here to Skip to main content
15,913,315 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: vector and char** Pin
vikramlinux22-May-08 3:28
vikramlinux22-May-08 3:28 
GeneralRe: vector and char** Pin
CPallini22-May-08 4:17
mveCPallini22-May-08 4:17 
GeneralRe: vector and char** Pin
toxcct22-May-08 4:36
toxcct22-May-08 4:36 
GeneralRe: vector and char** Pin
CPallini22-May-08 5:36
mveCPallini22-May-08 5:36 
RantRe: vector and char** Pin
toxcct22-May-08 5:43
toxcct22-May-08 5:43 
GeneralRe: vector and char** Pin
CPallini22-May-08 5:49
mveCPallini22-May-08 5:49 
GeneralRe: vector and char** Pin
toxcct22-May-08 5:52
toxcct22-May-08 5:52 
GeneralRe: vector and char** Pin
CPallini22-May-08 5:57
mveCPallini22-May-08 5:57 
Namely:
std::vector<std::string> v;
 
size_t n = v.size();
char** str_arr = ::new char*[n];
 
int i = 0;
for (vector<string>::iterator it = v.begin(); it != v.end(); it++, i++) {
    str_arr[i] = (char *) it->c_str();
}
</string></std::string>
Wink | ;)

When dealing with large strings it maybe suitable.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


GeneralRe: vector and char** Pin
toxcct22-May-08 6:00
toxcct22-May-08 6:00 
GeneralRe: vector and char** Pin
vikramlinux22-May-08 19:44
vikramlinux22-May-08 19:44 
GeneralRe: vector and char** Pin
toxcct22-May-08 20:59
toxcct22-May-08 20:59 
AnswerOh yes. Pin
CPallini22-May-08 3:28
mveCPallini22-May-08 3:28 
Questiond3dx9_36.dll Pin
Hanan88822-May-08 2:49
Hanan88822-May-08 2:49 
AnswerRe: d3dx9_36.dll Pin
toxcct22-May-08 2:56
toxcct22-May-08 2:56 
GeneralRe: d3dx9_36.dll Pin
Hanan88822-May-08 3:04
Hanan88822-May-08 3:04 
AnswerRe: d3dx9_36.dll Pin
David Crow22-May-08 3:30
David Crow22-May-08 3:30 
AnswerRe: d3dx9_36.dll Pin
Hamid_RT22-May-08 4:15
Hamid_RT22-May-08 4:15 
AnswerRe: d3dx9_36.dll Pin
Rajkumar R22-May-08 7:26
Rajkumar R22-May-08 7:26 
AnswerRe: d3dx9_36.dll Pin
Dan22-May-08 17:28
Dan22-May-08 17:28 
QuestionVista elevation problem Pin
Le@rner22-May-08 2:48
Le@rner22-May-08 2:48 
AnswerRe: Vista elevation problem Pin
Rajesh R Subramanian22-May-08 3:00
professionalRajesh R Subramanian22-May-08 3:00 
QuestionDirectX9 and windows XP Pin
Hanan88822-May-08 2:47
Hanan88822-May-08 2:47 
AnswerRe: DirectX9 and windows XP Pin
CPallini22-May-08 2:52
mveCPallini22-May-08 2:52 
AnswerRe: DirectX9 and windows XP Pin
toxcct22-May-08 2:59
toxcct22-May-08 2:59 
GeneralRe: DirectX9 and windows XP [modified] Pin
Rajkumar R22-May-08 7:14
Rajkumar R22-May-08 7:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.