•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 391,815 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,566 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 162 | Replies: 1
![]() |
Assuming you're using an explicit size variable to store the number of strings:
A common alternative is using a null pointer as a sentinel. In that case, it would look like this:
c Syntax (Toggle Plain Text)
int i; for ( i = 0; i < n; i++ ) printf ( "%s\n", pOutData[i] );
c Syntax (Toggle Plain Text)
char **p = pOutData; while ( *p != NULL ) printf ( "%s\n", *p++ );
Last edited by Narue : Mar 19th, 2008 at 11:07 am.
Member of: Beautiful Code Club.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
- Mapping c# array with COM SAFEARRAY &/or BSTR (C#)
- Dynamic Array of Structures, Loop problem! (C++)
- help on 'Segmentation Fault' (C)
- segmentation fault (C)
- How to be Crash Free (C++)
- Safe Array (C++)
- accessing private data members (C++)
- Accessing functions from base class (C)
Other Threads in the C Forum
- Previous Thread: OpenGL setting screen coordinates
- Next Thread: Filters for Image Filtering using C



Linear Mode