c - Creating a two-dimensional array of fixed-length strings (character arrays) -


so i've been trying create object in c 2 columns of empty char arrays. contents resemble

char * strings[3][2] {   {"thing1", "value1"}   {"thing2", "value2"}   {"thing3", "value3"} } 

...except actual char *s empty arrays fixed length, rather initialized strings, i.e. each string "char string[6]".

i've been searching time i'm coming dry. happen know syntax creating such object?

maybe this:

typedef char sixchars[7];  sixchars strings[3][2] = { { "thing1", "value1" }                          , { "thing2", "value2" }                          , { "thing3", "value3" }                          }; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -