expected primary-expression before '.' token

Hello guys. Im pretty new to arduino and programming itself. I’m doing this project for my university, and i can’t understand what’s the problem with this code. I downloaded the code, but i get this error

error: expected primary-expression before '.' token

   lcd.print(DHT.humidity);

This is my full code

#include <dht.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

dht DHT;

#define DHT11_PIN 7
int pin=8;
int pinLed=9;

void setup(){
 lcd.begin(16, 2);
 Serial.begin(9600);
 pinMode(pin, INPUT);
 pinMode(pinLed,OUTPUT);
}
int rain=0;
int measurement=0;

void loop()
{
 int chk = DHT.read11(DHT11_PIN);
 lcd.setCursor(0,0); 
 lcd.print("Temp: ");
 lcd.print(DHT.temperature);
 lcd.print((char)223);
 lcd.print("C");
 lcd.setCursor(0,1);
 lcd.print("Umid: ");
 lcd.print(DHT.humidity);
 lcd.print("%");
 delay(1000);
 rain = digitalRead(pin); 
 if(rain==1) 
   digitalWrite(pinLed,LOW);
 if(rain==0)
   digitalWrite(pinLed,HIGH);
   measurement = analogRead(A0);
   Serial.println(measurement);
 
 
 
 delay(1000);
 }

Any ideas?

Please change your quote tags to code tags. The forum software eats some of your code if you don't.

DHT.humidity is a pointer to the humidity method in the DHT object. DHT.humidity() calls the humidity method and returns the humidity reading.

MorganS:
Please change your quote tags to code tags. The forum software eats some of your code if you don't.

DHT.humidity is a pointer to the humidity method in the DHT object. DHT.humidity() calls the humidity method and returns the humidity reading.

Changed quotes to code. So, if i understand you correctly, i need to change DHT.humidity to DHT.humidity()?

Copy the example which came with the DHT11 library. That will show you what to do.

Walkmanas:
Changed quotes to code. So, if i understand you correctly, i need to change DHT.humidity to DHT.humidity()?

Why didn't you try it, before asking us?