Fwd: Re: wrong C++ error ?

Jochen Kuepper jochen@uni-duesseldorf.de
Fri May 28 07:10:00 GMT 1999


Hi All,

The following code (well, fragment):

  class KProcess : public QObject
  {
    ...
  public:
    bool writeStdin(char *buffer, int buflen);
    ...
  }

  function()
  {
    string input;
    KProcess process;
    ...
    process.writeStdin( input.c_str(), input.length() )
    ...

gives the following error message:
  passing `const char *' as argument 1 of 
  `KProcess::writeStdin(char *,int)' discards qualifiers
To my mind this has to be a warning, not an error message.

This is with gcc version gcc-2.95 19990527 (prerelease)

I can provide the input file if necessary.

-- Jochen
 Heinrich-Heine-Universität Düsseldorf          jochen@uni-duesseldorf.de
 Institut für Physikalische Chemie I               phone ++49-211-8113681
 Universitätsstr. 26.43.02.29                      fax   ++49-211-8115195
 40225 Düsseldorf, Germany       www-public.rz.uni-duesseldorf.de/~jochen


More information about the Gcc-bugs mailing list