New to C++ and Arduino. What am I doing wrong?

ok, so I am trying my hand at inheritance and I tried to inherit the NewSoftSerial class, but Im getting an error:

hardware\libraries\demo/demo.h:4:27: error: NewSoftSerial.h: No such file or directory

I had this all in one file and did not get an error:

#ifndef DEMO_H_
#define DEMO_H_

#include <NewSoftSerial.h>

class demo : public NewSoftSerial
{
  private:       
  public:
        demo();
        void setBaud(int b);       
};
#endif

demo::demo() : NewSoftSerial(2,3)
{
}

void demo::setBaud(int b)
{
  begin(b);
}

// Start of main prog
demo testDemo;

void setup()
{
  testDemo.setBaud(9600);
}

void loop()
{ 
}

But when I placed the code in separate file, a .h, a .cpp, and a .pde I get that error.
Here is what I have in each file:
The .h file

#ifndef DEMO_H_
#define DEMO_H_

#include <NewSoftSerial.h>

class demo : public NewSoftSerial
{
  private:
  public:
        demo();
        void setBaud(int b);
};
#endif

The .cpp file.

#include <demo.h>

demo::demo() : NewSoftSerial(2,3)
{
}

void demo::setBaud(int b)
{
  begin(b);
}

and the .pde file

#include <demo.h>

demo testDemo;

void setup()
{
  testDemo.setBaud(9600);
}

void loop()
{ 
}

What is it that is causing my problem?

hardware\libraries\demo/demo.h:4:27: error: NewSoftSerial.h: No such file or directory

You probably have the .h and .cpp files in the wrong directory. Both files need to be in a folder named "demo", and that folder needs to be in the hardware\libraries folder.

Good luck!

And just to head off the next problem, whenever you startup Arduino.exe, it will compile the .h and .cpp into a .o file. When you make changes to the library, you need to manually delete the .o file and restart arduino.exe to recompile it. Otherwise your changes will have no effect.

and restart arduino.exe to recompile it

I haven't needed to restart the Arduino IDE. Have you tried skipping this step?

Thanks for the info. I tried putting them into there own folder nammed 'demo", but still got the problem. I got around it by including the NewSoftSerial.h header file in all the code, the .h, the .cpp, and the sketch. Might not be right, but ti works :)

I haven't needed to restart the Arduino IDE. Have you tried skipping this step?

I just tried it now, and you're right. That'll save me some time. Thanks.

Apparently, it will recompile libraries you don't even include in the current sketch, as long as the .o is deleted first.