'EEPROM' was not declared in this scope

I use the following example:
#include "Arduino.h"
#include "EEPROM.h"

int addr = 0;

void setup()
{
}
void loop()
{
int val = analogRead(0) / 4;
EEPROM.write(addr, val);
addr = addr + 1;
if (addr == 512)
addr = 0;
delay(100);
}
I get the error: 'EEPROM' was not declared in this scope.
What is wrong?

The clue is in the error message - you haven't declared anything called "EEPROM".

Please use code tags when posting code

I compiled your code. The only "error" message I got was:

Binary sketch size: 894 bytes (of a 32,256 byte maximum)

Since you didn't think it important to mention what OS, what version of the IDE, or which Arduino, I won't, either.

ssijbesma:
I use the following example:

#include "Arduino.h"

#include "EEPROM.h"



I get the error: 'EEPROM' was not declared in this scope.
What is wrong?

Tried

#include <Arduino.h>
#include <EEPROM.h>

instead?