error in coding

I have Arduino Leonardo and I am trying to run the below code but i get errors. Please help.

#include <DHT.h>
DHT dht;
#define DHT11_PIN D11

void setup(){
  Serial.begin(9600);
}

void loop{
  int chk = dht.read11(DHT11_PIN);
  Serial.print("Temperature = ");
  Serial.println(dht.temperature);
  Serial.print("Humidity = ");
  Serial.println(dht.humidity);
  delay(1000);
}

the error is:

no matching function for call to 'DHT::DHT()' from line 2

Thanks.

You're using the DHT library wrong - probably you're using a different DHT library than the one that you've based your code on examples for; there are multiple mutually incompatible DHT libraries named DHT.h

You also posted in the tutorials section, which is intended for people to post tutorials, rather than the programming questions section - I've reported the post to get moved to the appropriate section.

Thanks for the reply,

How I can fix the problem, which library I should use?

rwahdan:
How I can fix the problem, which library I should use?

To use the library you already have:
Look at the examples provided with the library (File->Examples->DHT) to see how to use the library. Fix your sketch to better match the examples.
To use a different library:
Run the Library Manager (Sketch->Include Library->Manage Libraries...) and type "DHT11" into "Filter your search..." box. Click on the library you want to install and then click on the Install button. Then look at the examples provided with the library to see how to use it.