Error compiling code with PString.h

Hi,

I am relatively new to working with Arduino, and I am having some problems using PString.h in Arduino 1.0. I downloaded the PString2 library and installed it, and I am trying to compile the test_pstring example to verify that it works correctly. I get the following error:

In file included from test_pstring.cpp:1:
C:\arduino-1.0-windows\arduino-1.0\libraries\PString/PString.h:34: error: conflicting return type specified for 'virtual void PString::write(uint8_t)'
C:\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'

While I have been able to resolve minor issues like editing .h files to add Arduino.h in the include, this one is beyond my knowledge. And, I haven’t been able to get any search results to help me. Can someone tell me what I am missing?

Thanks,

Blitzer

Change line 34 of PString.h to:

virtual size_t write(uint8_t);

And line 29 of Pstring.cpp to:

size_t PString::write(uint8_t b)

And not neccessary but I believe its more correct, add these 2 return lines to Pstring.cpp

size_t PString::write(uint8_t b)
{
  if (_cur + 1 < _buf + _size)
  {
    *_cur++ = (char)b;
    *_cur = '\0';
	return 1;
  }
  return 0;
}

Awesome!!! Thanks a lot.