PID command not working in compiler

I am trying to program my arduino uno using Example of PID controller.
but getting error as below:
error: 'PID' does not name a type

what is the problem?
with compiler or code??

with compiler or code??

Code.
Probably the code you didn't show us or install correctly.

/********************************************************

  • PID Basic Example
  • Reading analog input 0 to control analog PWM output 3
    ********************************************************/

#include <PID_v1.h>

//Define Variables we'll be connecting to
double Setpoint, Input, Output;

//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint,2,5,1, DIRECT);

void setup()
{
//initialize the variables we're linked to
Input = analogRead(0);
Setpoint = 100;

//turn the PID on
myPID.SetMode(AUTOMATIC);
}

void loop()
{
Input = analogRead(0);
myPID.Compute();
analogWrite(3,Output);
}

. . . or even post correctly. {sigh}

Where did you put the PID_v1 library?

it is in my downloads file

it is in my "downloads" folder

The IDE doesn't look there for libraries. There should be a libraries folder in the folder where your sketches are. If not, create one and then copy the PID library folder there. Restart the IDE and you should hopefully get better results.

The compiler won't find it there, it needs to be in your "libraries" folder.
Start here