string to char array?

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 3 05:50:16 PDT 2015


On Wednesday, 3 June 2015 at 11:59:56 UTC, Kyoji Klyden wrote:
> That's what I found so confusing about the opengl docs. Just 
> guessing here but char* is a pointer to the first char in the 
> string, then what exactly is char**? Is it pointing to the 
> first char of the first string in an array?

If you use a pointer for a string, you can have an array of such 
pointers as array of strings, then char** would point to the 
first pointer in that array.

> Does C/D just scrub through memory until it finds the end of an 
> array? Also what signifies an end of array, or any other 
> keypoints?

C has various conventions to indicate the length, this function 
uses three conventions simultaneously, so you can choose, which 
suits you the best.


More information about the Digitalmars-d-learn mailing list