Click here to Skip to main content
14,427,893 members

C / C++ / MFC

 
GeneralRe: Error reading characters of string Pin
SundararamanS29-Jul-15 0:39
MemberSundararamanS29-Jul-15 0:39 
QuestionAccessing / printing two dimensional array of char using pointers Pin
Vaclav_26-Jul-15 5:06
MemberVaclav_26-Jul-15 5:06 
AnswerRe: Accessing / printing two dimensional array of char using pointers Pin
Richard MacCutchan26-Jul-15 6:51
communityengineerRichard MacCutchan26-Jul-15 6:51 
AnswerRe: Accessing / printing two dimensional array of char using pointers Pin
enhzflep26-Jul-15 7:47
Memberenhzflep26-Jul-15 7:47 
GeneralRe: Accessing / printing two dimensional array of char using pointers Pin
Vaclav_26-Jul-15 8:35
MemberVaclav_26-Jul-15 8:35 
QuestionRe: Accessing / printing two dimensional array of char using pointers Pin
CPallini26-Jul-15 21:49
mveCPallini26-Jul-15 21:49 
AnswerRe: Accessing / printing two dimensional array of char using pointers Pin
enhzflep27-Jul-15 1:54
Memberenhzflep27-Jul-15 1:54 
GeneralRe: Accessing / printing two dimensional array of char using pointers Pin
Vaclav_27-Jul-15 16:23
MemberVaclav_27-Jul-15 16:23 
Ok I think I am getting the picture.
But I cannot figure out how to implement same pointer arithmetic in double array.
I got the first "record" working fine, can access all strings / fields, but cannot get to the next one.

I am still not sure how does the pointer , and not the char in array , get incremented.

I have deleted the LCD code which confused many and added printf , which is not part of "core" Arduino code , so this should pass by them now.

I still would like some verbal description of the assignment of pointer to the array.
Appreciate your help very much.
Cheers
Vaclav





<pre lang="c++"> // double array of pointers
char *stringTable[][5] = {{ "string 1", "string two", "string three", NULL },
{ "second string 1", "second string two", "second string three", NULL }

};

char **curPtr = *stringTable; // pointer to array of pointers


do
{
printf("%s\n", *curPtr++); // dereference to get the ptr to the string
} while ( *curPtr ); // quit loop when we get to our NULL pointer.<pre lang="c++"><pre lang="c++"></pre></pre></pre>
GeneralRe: Accessing / printing two dimensional array of char using pointers Pin
enhzflep27-Jul-15 19:12
Memberenhzflep27-Jul-15 19:12 
GeneralSOLVED Re: Accessing / printing two dimensional array of char using pointers Pin
Vaclav_28-Jul-15 5:04
MemberVaclav_28-Jul-15 5:04 
QuestionRe: Accessing / printing two dimensional array of char using pointers Pin
David Crow27-Jul-15 5:59
MemberDavid Crow27-Jul-15 5:59 
AnswerRe: Accessing / printing two dimensional array of char using pointers Pin
Jeremy Falcon27-Jul-15 6:13
professionalJeremy Falcon27-Jul-15 6:13 
GeneralRe: Accessing / printing two dimensional array of char using pointers Pin
Vaclav_27-Jul-15 6:51
MemberVaclav_27-Jul-15 6:51 
GeneralRe: Accessing / printing two dimensional array of char using pointers Pin
Jeremy Falcon27-Jul-15 7:01
professionalJeremy Falcon27-Jul-15 7:01 
GeneralRe: Accessing / printing two dimensional array of char using pointers Pin
Richard MacCutchan27-Jul-15 8:20
communityengineerRichard MacCutchan27-Jul-15 8:20 
QuestionAdd button to vertical toolbar embedded in CPagerCtrl embedded in CDockingPane attached to CFrameWndEx Pin
Craig Hewitt24-Jul-15 10:02
professionalCraig Hewitt24-Jul-15 10:02 
QuestionC or C++ for customized embedded Linux, which is the best and why? Pin
Abdullah A._Mohamed22-Jul-15 21:16
MemberAbdullah A._Mohamed22-Jul-15 21:16 
AnswerRe: C or C++ for customized embedded Linux, which is the best and why? Pin
CPallini22-Jul-15 21:37
mveCPallini22-Jul-15 21:37 
GeneralRe: C or C++ for customized embedded Linux, which is the best and why? Pin
Richard Deeming23-Jul-15 3:00
communityengineerRichard Deeming23-Jul-15 3:00 
GeneralRe: C or C++ for customized embedded Linux, which is the best and why? Pin
CPallini23-Jul-15 3:06
mveCPallini23-Jul-15 3:06 
GeneralRe: C or C++ for customized embedded Linux, which is the best and why? Pin
Abdullah A._Mohamed23-Jul-15 20:19
MemberAbdullah A._Mohamed23-Jul-15 20:19 
GeneralRe: C or C++ for customized embedded Linux, which is the best and why? Pin
CPallini23-Jul-15 21:45
mveCPallini23-Jul-15 21:45 
AnswerRe: C or C++ for customized embedded Linux, which is the best and why? Pin
Albert Holguin23-Jul-15 15:57
professionalAlbert Holguin23-Jul-15 15:57 
GeneralRe: C or C++ for customized embedded Linux, which is the best and why? Pin
Abdullah A._Mohamed23-Jul-15 20:28
MemberAbdullah A._Mohamed23-Jul-15 20:28 
GeneralRe: C or C++ for customized embedded Linux, which is the best and why? Pin
Albert Holguin24-Jul-15 5:11
professionalAlbert Holguin24-Jul-15 5:11 

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.