null was not declared in this scope

Hi. I am basically trying to make a post request to a webservice. I am getting the error of “null was not declared in this scope” at the following line:

err=http.post(“ds.sidnow.com”, 80, url, null); (it is toward the end of the program)
The whole program is thus:
#include <SPI.h>
#include <Ethernet.h>
#include <HttpClient.h>
#include <String.h>

//change these
byte mac = { 0x90, 0xA2, 0xDA, 0x0D, 0xB2, 0xAE };
const char kPath = “/v2/feeds/54021.csv”;
const char kHostname = “ds.sidnow.com/SidAppService.svc/putDeviceData”;

int readlight(int lt){

float tmpflt = (float)lt1.1/1024;
int percent = 100
(0.99-tmpflt);

if(percent > 100)
percent = 100;
if(percent < 0 )
percent = 0;

return percent;
}

int readtemp(int tm){

float tmpflt = (float)tm*1.1/1024;

int Rth = 0;
boolean done = false;

while(done == false){

float res1 = tmpflt*((float)Rth+1000);
float res2 = (float)Rth*3.3;

if(res2 > res1)
done = true;
else Rth+=1;
}
Rth-=1;

//temperature
float tmptemp = 25.0+(float)(Rth-500)(-0.05);
float fahrenheight = 32+tmptemp
(float)9/(float)5;

int tmpout = (int)fahrenheight;

return tmpout;

}

int readfromserial(){

while(true){

if(Serial.available() > 0)
return Serial.read();
}
}

int readvalue(int sensorid, int mode){

const double ref = 1.1;

int length;
int address;
int signalstrength;
byte tmp;

double voltage0, voltage1;

boolean done = false;

while(done == false){
if(Serial.read() == 0x7E){

int lengthh = readfromserial();
int lengthl = readfromserial();
length = 256*lengthh+lengthl;

if(readfromserial() == 0x83){

int addressh = readfromserial();
int addressl = readfromserial();
address = 256*addressh+addressl;

if(address == (sensorid-1)){
done =true;

signalstrength = readfromserial();

for(int i = 1;i <= 6; i++){
tmp = readfromserial();
}

int ad0h = readfromserial();
int ad0l = readfromserial();
int ad0tmp = 256*ad0h+ad0l;
readlight(ad0tmp);

int ad1h = readfromserial();
int ad1l = readfromserial();
int ad1tmp = 256*ad1h+ad1l;

if(mode == 0)
return readlight(ad0tmp);

if(mode == 1)
return readtemp(ad1tmp);

}
}
}
}

return -1;
}

EthernetClient c;
HttpClient http(c);

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
delay(500);

while (Ethernet.begin(mac) != 1)
{
Serial.println(“Error getting IP address via DHCP, trying again…”);
delay(15000);
}

}

void loop() {
// main program loop

// read values from sensors
// int sensorValue1 = readvalue(1,0);
// int sensorValue2 = readvalue(1,1);
int sensorValue3 = readvalue(2,0);
int sensorValue4 = readvalue(2,1);
int sensorValue5 = readvalue(3,0);
int sensorValue6 = readvalue(3,1);
int sensorValue7 = readvalue(4,0);
int sensorValue8 = readvalue(4,1);

Serial.println(“sensor readings”);
Serial.println(sensorValue3);
Serial.println(sensorValue4);
Serial.println(sensorValue5);
Serial.println(sensorValue6);
Serial.println(sensorValue7);
Serial.println(sensorValue8);

//create xml string
String xml1 = “<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><![CDATA[”;

//sensorValue4

String xml2="]]><![CDATA[";

//sensorValue6

String xml3="]]><![CDATA[";

//sensorValue8
String xml4="]]><![CDATA[";

//sensorValue3

String xml5="]]><![CDATA[";

//sensorValue5

String xml6="]]><![CDATA[";

//sensorValue7

String xml7="]]>";

//main xml string
String xmlStr;

xmlStr = xml1+sensorValue4+xml2+sensorValue6+xml3+sensorValue8+xml4+sensorValue3+xml5+sensorValue5+xml6+sensorValue7+xml7;

int err = 0;

http.beginRequest();
//err=http.put(kHostname, kPath);

//generate url
String url = “ds.sidnow.com/SidAppService.svc/putDeviceData/?&apikey=PIRH2OOl@AlvtFxuLEJ4MA==&userId=111&status=1&type=mobile”;

err=http.post(“ds.sidnow.com”, 80, url, null);

if(err == 0){

Serial.println(“startedRequest ok”);
Serial.print(xmlStr);

//apikey, update this section
http.sendHeader(“apikey”, “uQ9i/ROEOc5Z1AltY3uSUnbMgQtiktP7U4tXXxB1Ep4=”);
http.sendHeader(“deviceData”, xmlStr);

http.endRequest();

err = http.responseStatusCode();
if (err >= 0)
{
Serial.print("Got status code: ");
Serial.println(err);

// Usually you’d check that the response code is 200 or a
// similar “success” code (200-299) before carrying on,
// but we’ll print out whatever response we get
}
else
{
Serial.print("Getting response failed: ");
Serial.println(err);
}
}
else
{
Serial.print("Connect failed: ");
Serial.println(err);
}

http.stop();

// Wait for a bit before updating things again
delay(2000);
}

Apparently 'null' is not a pre-defined name. Perhaps you should be using 'Null' or 'NULL' or 0.

NULL or null, There's a big difference.

Docedison is right. In C++, NULL is 0. However, that's not always been the case. Back in the old C days, there were near and far pointers and NULL for a far pointer did not mean 0. The X3J11 C standard allows the compiler vendor to define null to be whatever the vendor wishes it to be. The Committee did that because they thought there might be efficiency or technical reasons for it not to be 0 so they left it open for the vendor. Because the Arduino compiler is actually based on a C++ implementation, NULL is zero in the IDE.