Go Down

Topic: how to create and array with multiple phone numbers (Read 137 times) previous topic - next topic

mromero

tried and caused error expected unqualified-id before sting constant :
char phone_number[] = "+12222222222","+13333333333","+14444444444";




tried and caused too many initialers for 'char[]'
char phone_number[] = {"+12222222222","+13333333333","+14444444444"};

SurferTim

Code: [Select]
char phone_number[][14] = {"+12222222222","+13333333333","+14444444444"};

PaulS

or
Code: [Select]
char *phoneNumbers[] = {"+12222222222","+13333333333","+14444444444"};
The art of getting good answers lies in asking good questions.

Go Up