Create a Class - Error

I am tring to create a class that setsup the ADC, A Timer and so...
I am tring to create also a class that for example turns a LED on, or off using methods.

The problem is that it does not compile for the arduino.
It says that there is a problem with the method like ADC, when I am tring to use it.

I have tried to include different headers but it didnt work.

please help.

For example: Header file

class SetupClass
	int Calculate_Register_Value(int Desired_Freq);
	void ADC_Timer();
	void ADC();
	void DAC(int Resolution);
	void Serial_Timer();



Then let look at the CPP

void SetupClass::ADC()
	PMC->PMC_PCER1 |= PMC_PCER1_PID37;  // ADC power on

	NVIC_EnableIRQ(ADC_IRQn); // enable ADC interrupt vector

	ADC->ADC_IDR = 0xFFFFFFFF; // Disables all interrupts
	ADC->ADC_IER = 0x80; // Enable End-Of-Conversion interrupt on Channel 7 -> A0

	ADC->ADC_CHDR = 0xFFFFFFFF; // Disables all channels
	ADC->ADC_CHER = 0x80; // Enable channel 7

	ADC->ADC_MR = ADC->ADC_MR & 0xFFFFFFF0; // Disable Trigers | 4 lowesr bits of ADC_MR
	ADC->ADC_MR = ADC->ADC_MR | 0x2; // TRGEN on => External trigger
	ADC->ADC_MR = ADC->ADC_MR | 0x1; // TIOA Output of the Timer Counter Channel 0

	ADC->ADC_MR = ADC->ADC_MR & 0xFFFFFFEF; // 12-bit resolution

Then in the Arduino IDE:

SetupClass Setup;

void setup()
     Setup.ADC(); // Here is a problem and I dont know why.

I have tried to include many files like:

#include "Arduino.h"
#include "wiring_analog.h"
#include "wiring_digital.h"
#include "ControlClass.h"
#include "pmc.h"
#include "component_adc.h"
#include "tc.h"
#include "wiring_constants.h"
#include "dac.h"
#include "pins_arduino.h"

This blog may be useful to create a class:

I actualy know how to write in OOP. The problem is the compilation doesnt work.
I belive I need to include specfice headers and I dont now what.

ADC is defined as a macro, so you will have to rename SetupClass::ADC to something else. You can't use "Adc" either as it will cause a conflict when expanding ADC.

Ok I have tried this too and then I get and error with this line:

NVIC_EnableIRQ(ADC_IRQn); // enable ADC interrupt vector
#include <sam.h>

<Arduino.h> includes it, too.