Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Idiot question in VC++ 7.0. Variable size arrays ? Pin
Joaquín M López Muñoz18-Feb-02 8:24
Joaquín M López Muñoz18-Feb-02 8:24 
GeneralRe: Idiot question in VC++ 7.0. Variable size arrays ? Pin
18-Feb-02 8:34
suss18-Feb-02 8:34 
GeneralRe: Idiot question in VC++ 7.0. Variable size arrays ? Pin
Joaquín M López Muñoz18-Feb-02 8:46
Joaquín M López Muñoz18-Feb-02 8:46 
GeneralRe: Idiot question in VC++ 7.0. Variable size arrays ? Pin
pba_18-Feb-02 9:51
pba_18-Feb-02 9:51 
Generalvc++ Pin
18-Feb-02 7:26
suss18-Feb-02 7:26 
GeneralRe: vc++ Pin
Christian Graus18-Feb-02 10:40
protectorChristian Graus18-Feb-02 10:40 
GeneralI want lesson on pointer char ** Pin
18-Feb-02 7:15
suss18-Feb-02 7:15 
GeneralRe: I want lesson on pointer char ** Pin
Joaquín M López Muñoz18-Feb-02 8:19
Joaquín M López Muñoz18-Feb-02 8:19 
  1. Yes you can. In your particular case the replacement would look like
    ValeurColonne = new (char *)[10];
    The deletion is done with
    delete [] ValeurColonne;

  2. The line is not entirely correct (except if one assumes there's additional code not showed here). ValeurColonne is an array, namely an array of char *. That is, each element of ValeurColonne is a pointer to char.Then your line is semantically equivalent to
    char * pChar=valuerColonne[i];
    strcpy(pChar,"Some text");
    The bug in the code is this: strcpy assumes that there's some allocated space pointed to by pChar where the string copying can be performed. As your code stands, pChar is null for all the positions of ValeurColonne, and a crash in your program is guaranteed.




    Joaquín M López Muñoz
    Telefónica, Investigación y Desarrollo

GeneralCOM wrapper, __cdecl and __stdcall Pin
SuperGeek18-Feb-02 7:15
SuperGeek18-Feb-02 7:15 
GeneralRe: COM wrapper, __cdecl and __stdcall Pin
Joaquín M López Muñoz18-Feb-02 8:38
Joaquín M López Muñoz18-Feb-02 8:38 
GeneralRe: COM wrapper, __cdecl and __stdcall Pin
pba_18-Feb-02 11:47
pba_18-Feb-02 11:47 
GeneralRe: COM wrapper, __cdecl and __stdcall Pin
moliate18-Feb-02 12:20
moliate18-Feb-02 12:20 
GeneralRe: COM wrapper, __cdecl and __stdcall Pin
Paul M Watt19-Feb-02 13:39
mentorPaul M Watt19-Feb-02 13:39 
GeneralVisual C++ & OpenGL Pin
Rajveer18-Feb-02 7:10
Rajveer18-Feb-02 7:10 
GeneralRe: Visual C++ & OpenGL Pin
Michael A. Barnhart19-Feb-02 7:12
Michael A. Barnhart19-Feb-02 7:12 
GeneralTroubles when trying to load an inserted ActiveX that was inserted in an automated instance of Word Pin
Braulio Dez18-Feb-02 5:34
Braulio Dez18-Feb-02 5:34 
GeneralCListCtrl and CComboBox Pin
18-Feb-02 5:20
suss18-Feb-02 5:20 
GeneralRe: CListCtrl and CComboBox Pin
alex.barylski18-Feb-02 5:21
alex.barylski18-Feb-02 5:21 
GeneralRe: CListCtrl and CComboBox Pin
Mazdak18-Feb-02 5:27
Mazdak18-Feb-02 5:27 
GeneralMoving DCs about! Pin
paulccc18-Feb-02 5:01
paulccc18-Feb-02 5:01 
GeneralRe: Moving DCs about! Pin
Joaquín M López Muñoz18-Feb-02 5:15
Joaquín M López Muñoz18-Feb-02 5:15 
GeneralRe: Moving DCs about! Pin
paulccc18-Feb-02 5:23
paulccc18-Feb-02 5:23 
GeneralRe: Moving DCs about! Pin
Shog918-Feb-02 5:57
sitebuilderShog918-Feb-02 5:57 
GeneralIActiveDesktop::SetWallpaper problem Pin
Rickard Andersson2018-Feb-02 4:02
Rickard Andersson2018-Feb-02 4:02 
GeneralRe: IActiveDesktop::SetWallpaper problem Pin
Joaquín M López Muñoz18-Feb-02 4:49
Joaquín M López Muñoz18-Feb-02 4:49 

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.