error message on temperature controlled fan

Hey, im trying to use a DHT11 for a temperature controlled fan project, and keep getting this error message on my code, which ill put below the error. How can I fix the unexpected token message?

Arduino: 1.8.5 (Mac OS X), Board: “Arduino/Genuino Uno”

/Users/DanyaalT/Documents/Arduino/sketch_mar12b/sketch_mar12b.ino:5:1: warning: declaration does not declare anything [-fpermissive]
DHT;
^
/Users/DanyaalT/Documents/Arduino/sketch_mar12b/sketch_mar12b.ino: In function ‘void loop()’:
sketch_mar12b:24: error: expected unqualified-id before ‘.’ token
DHT.read11(dht_dpin);
^
sketch_mar12b:25: error: expected primary-expression before ‘.’ token
int temp=DHT.temperature;
^
exit status 1
expected unqualified-id before ‘.’ token

#include<DHT.h> // Including library for dht
#include<LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
#define dht_dpin 12
DHT;
#define pwm 9

void setup()
{
lcd.begin(16, 2);

lcd.clear();
lcd.print(" Fan Speed “);
lcd.setCursor(0,1);
lcd.print(” Controlling ");
delay(2000);
analogWrite(pwm, 255);
lcd.clear();
lcd.print("Circuit Digest ");
delay(2000);
}

void loop()
{
DHT.read11(dht_dpin);
int temp=DHT.temperature;
lcd.setCursor(0,0);
lcd.print(“Temperature:”);
lcd.print(temp); // Printing temperature on LCD

lcd.print(“oC”);
lcd.setCursor(0,1);
if(temp <26 )
{
analogWrite(9,0);
lcd.print("Fan OFF ");
delay(100);
}

else if(temp==26)
{
analogWrite(pwm, 51);
lcd.print("Fan Speed: 20% ");
delay(100);
}

else if(temp==27)
{
analogWrite(pwm, 102);
lcd.print("Fan Speed: 40% ");
delay(100);
}

else if(temp==28)
{
analogWrite(pwm, 153);
lcd.print("Fan Speed: 60% ");
delay(100);
}

else if(temp==29)
{
analogWrite(pwm, 204);
lcd.print("Fan Speed: 80% ");
delay(100);
}
else if(temp>29)
{
analogWrite(pwm, 255);
lcd.print("Fan Speed: 100% ");
delay(100);
}
delay(3000);
}

Look at how you declared the variable lcd for your LCD. Look at how you used the variable lcd.

There should be something similar to declare a variable for your temperature sensor but there is not. There should be something similar to use this variable for your temperature sensor but there is not.

By the way, code and error messages should be posted using code tags. If you don't understand this, read the topics at the top of the forum on how to use the forum.

The DHT libraries are about the dumbest libraries available. All of them seem to use DHT.h as the header file name, but some of them define a class named dht while others define a class called DHT.

There is NO excuse for publishing examples that define an instance of the class using the name fo the class as the instance name, but changing the case. But, they all seem to do that.

Stop following that stupid example. Name YOUR instance something that makes sense. dht does NOT make sense to me. livingRoomThermometer, spaThermometer, etc. make sense.

Of course, your code doesn’t properly create an instance.