How to add header file to project

This is my code for time delay.

.#include<regx51.h>

#define led P2

void delay (int i);


void main()
{
    while (1)
    {
        led = 0x01;
        delay(500);
        led = 0x01;
        delay(500) ;
    }
}

void delay (int i)

{
   unsigned int j;

   for ( i = 0 ; j < i; j++);
}

.

I want to add header file #include "delay.h"

code

.#include<regx51.h>

#include "delay.h"

#define led P2

void main()
{
    while (1)
    {
        led = 0xFF;
        delay(1000);
        led = 0x00;
        delay(500) ;
    }
}

I have gone through this link http://www.keil.com/support/docs/1740.htm This link is not helping much. Please help me with correct source

More questions in this forum