[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: C++ Issue with const char * on strchr
- From: Conrad Meyer <konrad tylerc org>
- To: Development discussions related to Fedora <fedora-devel-list redhat com>
- Subject: Re: C++ Issue with const char * on strchr
- Date: Tue, 10 Mar 2009 13:36:07 -0700
On Tuesday 10 March 2009 01:26:55 pm Jochen Schmitt wrote:
> hallo,
>
> I have a odd issue with the current g++ 4.4 release on rawhide.
>
> If I try to pass a string declared as const char * in a c++ programm
> to the
> strchr function, I will get an error message which tell me, that a
> conversation
> from const char * to char * is not valid.
>
> Because this doesn't happens on older releases of g++, I want to as:
> Is this
> a bug or a feature?
>
> Best Regards:
>
> Jochen Schmitt
My understanding is you can do something like this:
const char *str1, str2;
str2 = strchr(str1, 'a');
But str2 must be a const char *.
Maybe I am wrong, I am not very familiar with C++.
Regards,
--
Conrad Meyer <konrad tylerc org>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]