Click here to Skip to main content
15,890,185 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Menu change in IDE but not in running application Pin
Richard MacCutchan14-Nov-14 21:29
mveRichard MacCutchan14-Nov-14 21:29 
QuestionHow to change the name of a tabbed pane Pin
Gagnon Claude12-Nov-14 9:10
Gagnon Claude12-Nov-14 9:10 
AnswerRe: How to change the name of a tabbed pane Pin
Richard MacCutchan12-Nov-14 21:18
mveRichard MacCutchan12-Nov-14 21:18 
Questionc++ help Pin
Member 1122785412-Nov-14 3:44
Member 1122785412-Nov-14 3:44 
AnswerRe: c++ help Pin
Richard MacCutchan12-Nov-14 4:21
mveRichard MacCutchan12-Nov-14 4:21 
GeneralRe: c++ help Pin
Member 1122785414-Nov-14 4:09
Member 1122785414-Nov-14 4:09 
GeneralRe: c++ help Pin
Richard MacCutchan14-Nov-14 6:10
mveRichard MacCutchan14-Nov-14 6:10 
AnswerRe: c++ help Pin
CPallini13-Nov-14 21:35
mveCPallini13-Nov-14 21:35 
GeneralRe: c++ help Pin
Member 1122785414-Nov-14 4:12
Member 1122785414-Nov-14 4:12 
GeneralRe: c++ help Pin
Albert Holguin14-Nov-14 4:14
professionalAlbert Holguin14-Nov-14 4:14 
GeneralRe: c++ help Pin
Member 1122785414-Nov-14 4:29
Member 1122785414-Nov-14 4:29 
GeneralRe: c++ help Pin
Maximilien14-Nov-14 4:58
Maximilien14-Nov-14 4:58 
SuggestionRe: c++ help Pin
David Crow14-Nov-14 16:24
David Crow14-Nov-14 16:24 
GeneralTwo dimmensional array using pointers on Arduino Due Pin
Vaclav_10-Nov-14 9:43
Vaclav_10-Nov-14 9:43 
GeneralRe: Two dimmensional array using pointers on Arduino Due Pin
Albert Holguin10-Nov-14 16:58
professionalAlbert Holguin10-Nov-14 16:58 
GeneralRe: Two dimmensional array using pointers on Arduino Due Pin
Vaclav_11-Nov-14 3:39
Vaclav_11-Nov-14 3:39 
SuggestionMessage Closed Pin
15-Nov-14 7:37
4india15-Nov-14 7:37 
GeneralRe: Two dimmensional array using pointers on Arduino Due Pin
Albert Holguin15-Nov-14 7:57
professionalAlbert Holguin15-Nov-14 7:57 
QuestionRe: Two dimmensional array using pointers on Arduino Due Pin
David Crow11-Nov-14 4:12
David Crow11-Nov-14 4:12 
AnswerRe: Two dimmensional array using pointers on Arduino Due Pin
Richard MacCutchan11-Nov-14 6:42
mveRichard MacCutchan11-Nov-14 6:42 
You have two main problems.

Firstly you create 10 rows and then try to initialise 20 of them each with 10 columns, try:
C++
int **Display = new int *[10];    // display rows
for (i = 0; i < 10; i++)          // initialise each of 10 rows
    Display[i] = new int[20];      // with 20 columns

When adding your counter values into the array you increment your Display pointer (which indexes the rows only), which means that after 10 iterations it is pointing to an invalid address. Try using the offset values for row and column instead, as it will also make your code clearer, thus:
C++
// iterate through the 10 rows
for ( i = 0; i < iRow; i++)
{
    // for each column in the current row
    for (j = 0; j < iCol; j++)
    {
        // set the value of count
        Display[i][j] = iCount;
        ++iCount;
    }
}

GeneralSOLVED Re: Two dimmensional array using pointers on Arduino Due Pin
Vaclav_11-Nov-14 8:30
Vaclav_11-Nov-14 8:30 
GeneralRe: SOLVED Re: Two dimmensional array using pointers on Arduino Due Pin
Richard MacCutchan11-Nov-14 20:57
mveRichard MacCutchan11-Nov-14 20:57 
Questionmfc Pin
adilsk009-Nov-14 19:06
adilsk009-Nov-14 19:06 
AnswerRe: mfc Pin
_Flaviu9-Nov-14 20:18
_Flaviu9-Nov-14 20:18 
AnswerRe: mfc Pin
Richard MacCutchan9-Nov-14 21:46
mveRichard MacCutchan9-Nov-14 21:46 

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.