char *default message[]="hghgghjgh"
char *message=defaultmessage
tis line showing error as
'initializing':cannot convert from 'const char[ 9] to 'char *[]'
can u help me....?

char *default message[]="hghgghjgh"
char *message=defaultmessage
tis line showing error as
'initializing':cannot convert from 'const char[ 9] to 'char *[]'
can u help me....?

Start your own thread for your problems

Well how you fix it depends on what you're trying to achieve in the first place (we can't tell from 2 lines and an error message).

This should work (but is it what you want?)

char  defaultmessage[]="hghgghjgh";
char *message=defaultmessage;

I think the actual error is caused by the fact that both *default message (or probably *defaultmessage )is declared as a pointer array and you can't assign (not 100% true, but here is ok) a string. This is why if you have without * it works.

or is there something else you are asking??

I think the actual error is caused by the fact that both *default message (or probably *defaultmessage )is declared as a pointer array
I guess you mean array of pointers

and you can't assign (not 100% true, but here is ok) a string.

Why is it ok here ?

This is why if you have without * it works. or is there something else you are asking??

I think the solution provided by Salem is correct

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.