user42911: I am using a arduino and dht22 sensor for my project purpose annd gettting error as expecte before unqualified '.' token 
MY CODE IS :
#include <DHT.h>


#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include <Wire.h>


#define DHTPIN 8     
#define DHTTYPE DHT22   

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int ldrpin=A0;
int ldr=0;


DHT dht(DHTPIN, DHTTYPE);


//
//
//
//
//
//
//
//


void setup() 
    {

   lcd.begin(16, 2);
   Serial.begin (9600);
   DHT .begin();
     pinMode(ldrpin,INPUT);

}

//
//
//
//
//
//
//

void loop() 
    {

  lcd.setCursor(0,0);


 //ldr 
  ldr=analogRead(ldrpin);



//LDR DISPLAY
  Serial.println("LIGHT INTENSITY");
  Serial.println(ldr);
  Serial.print(" lx\t");
  delay(2000);

   lcd.clear();
    lcd.setCursor(0, 0); 

   lcd.print("LIGHT INTENSITY");
    delay(200);
    lcd.print(ldr);
      delay(2000);


//dht22 
delay(2000);

   int chk = DHT.read(DHTPIN);
    float humidity = DHT.humidity;
    float temperature = DHT.temperature;



//dht22 display
1.  Serial.println("Humidity: "); 
2.    Serial.print(h);
3.    Serial.print(" %\t");
4.    Serial.println("Temperature: "); 
5.    Serial.print(t);
  Serial.println(" *C ");

my error message is 
Arduino: 1.6.4 (Windows 8.1), Board: "Arduino Uno"

LCD.ino: In function 'void setup()':
LCD:38: error: expected unqualified-id before '.' token
LCD.ino: In function 'void loop()':
LCD:80: error: expected primary-expression before '.' token
LCD:81: error: expected primary-expression before '.' token
LCD:82: error: expected primary-expression before '.' token
LCD:87: error: expected ';' before 'Serial'
LCD:88: error: expected ';' before 'Serial'
LCD:89: error: expected ';' before 'Serial'
LCD:90: error: expected ';' before 'Serial'
LCD:91: error: expected ';' before 'Serial'
expected unqualified-id before '.' token

This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
some one help me please!!

user-1: Line 38, 80, 81, 82: DHT is a class name, dht is an instance of that class (an object, a variable), so write:
   dht.begin();

And all those call to DHT.something? Wrong too. Reemplaza DHT with dht.
All others errors: Why are you written "1. ", "2. ", before statements? Delete those numbers:
Serial.println("Humidity: "); 
Serial.print(h);
Serial.print(" %\t");
Serial.println("Temperature: "); 
Serial.print(t);
Serial.println(" *C ");

Also, you are missing a "}" to end loop().
When you correct this errors, others will surface.

42911: <p>I am using a arduino and dht22 sensor for my project purpose annd gettting error as expecte before unqualified '.' token </p>

<p>MY CODE IS :</p>

<pre><code>#include &lt;DHT.h&gt;


#include &lt;LiquidCrystal.h&gt;
#include &lt;SoftwareSerial.h&gt;
#include &lt;Wire.h&gt;


#define DHTPIN 8     
#define DHTTYPE DHT22   

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int ldrpin=A0;
int ldr=0;


DHT dht(DHTPIN, DHTTYPE);


//
//
//
//
//
//
//
//


void setup() 
    {

   lcd.begin(16, 2);
   Serial.begin (9600);
   DHT .begin();
     pinMode(ldrpin,INPUT);

}

//
//
//
//
//
//
//

void loop() 
    {

  lcd.setCursor(0,0);


 //ldr 
  ldr=analogRead(ldrpin);



//LDR DISPLAY
  Serial.println("LIGHT INTENSITY");
  Serial.println(ldr);
  Serial.print(" lx\t");
  delay(2000);

   lcd.clear();
    lcd.setCursor(0, 0); 

   lcd.print("LIGHT INTENSITY");
    delay(200);
    lcd.print(ldr);
      delay(2000);


//dht22 
delay(2000);

   int chk = DHT.read(DHTPIN);
    float humidity = DHT.humidity;
    float temperature = DHT.temperature;



//dht22 display
1.  Serial.println("Humidity: "); 
2.    Serial.print(h);
3.    Serial.print(" %\t");
4.    Serial.println("Temperature: "); 
5.    Serial.print(t);
  Serial.println(" *C ");
</code></pre>

<p>my error message is </p>

<pre><code>Arduino: 1.6.4 (Windows 8.1), Board: "Arduino Uno"

LCD.ino: In function 'void setup()':
LCD:38: error: expected unqualified-id before '.' token
LCD.ino: In function 'void loop()':
LCD:80: error: expected primary-expression before '.' token
LCD:81: error: expected primary-expression before '.' token
LCD:82: error: expected primary-expression before '.' token
LCD:87: error: expected ';' before 'Serial'
LCD:88: error: expected ';' before 'Serial'
LCD:89: error: expected ';' before 'Serial'
LCD:90: error: expected ';' before 'Serial'
LCD:91: error: expected ';' before 'Serial'
expected unqualified-id before '.' token
</code></pre>

<p>This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.</p>

<p>some one help me please!!</p>
 -1: <p>Line 38, 80, 81, 82: <code>DHT</code> is a class name, <code>dht</code> is an instance of that class (an object, a variable), so write:</p>

<pre><code>   dht.begin();
</code></pre>

<p>And all those call to DHT.something? Wrong too. Reemplaza DHT with dht.</p>

<p>All others errors: Why are you written "1. ", "2. ", before statements? Delete those numbers:</p>

<pre><code>Serial.println("Humidity: "); 
Serial.print(h);
Serial.print(" %\t");
Serial.println("Temperature: "); 
Serial.print(t);
Serial.println(" *C ");
</code></pre>

<p>Also, you are missing a "}" to end loop().</p>

<p>When you correct this errors, others will surface.</p>
