abc(const char*p)

this means the string is const but pointer is not..
try this :-
//suppose intially it was p="hello"
p="world"; // this will work.
*p='e'; // compile time error


On Fri, Jan 27, 2012 at 6:08 PM, rahul sharma <rahul23111...@gmail.com>wrote:

> is this a type of fxn overloading????????it should be allowed or not
> ?
>
>
> On Fri, Jan 27, 2012 at 4:37 PM, sukhmeet singh <sukhmeet2...@gmail.com>wrote:
>
>> they are same untill u are reading from the memory . As soon as you try
>> to modify or change .. it causes error.
>>
>> On Fri, Jan 27, 2012 at 2:32 PM, rahul sharma <rahul23111...@gmail.com>wrote:
>>
>>> int abc(char *);
>>> int abc(const char*);
>>>
>>> r theses same or different???...i m using dev comiler and it works..but
>>> isnt char is by default constant ???
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to