user33246: I'm writing library for smart home arduino DIY project.
i want to use another library(not written by me).
here is the code:  
boiler.cpp
#include "Boiler.h"

Boiler::Boiler(int pin)
{
    _pin = pin;
    dev.setDevice(_pin);                    // Set Device Output (on/off)
    turnOff();
}

boiler.h  
#ifndef BOILER_H_
#define BOILER_H_

// include RF24 libs
#include "RF24.h"
#include "RF24Network.h"
#include "RF24Mesh.h"
#include <SPI.h>

// SmartHome Lib Includes
#include "Device.h"
#include "TimerOne.h"
#include "timeSet.h"



class Boiler 
{

    private:

        RF24 radio(7, 8);
        RF24Network network(radio);
        RF24Mesh mesh(radio, network);

        int _pin ;

        void timerIsr();
        void DrawSCR();
    public:
        .
        .
        .

        Boiler (int pin );
        void turnOn();
        void turnOff();
};

The problem is it's not compiling
the error I get is :
Boiler.h: 32:14: error: expected identifier before numeric constant
RF24 radio(7, 8)  
What am i doing wrong?
Thanks,

user30005: 
What am i doing wrong? 

without seeing those includes, it is hard to tell.
I can say is that your original code, with the includes in boiler.h, is the right approach.
the revised code, which doesn't give you the error message, it not the right approach.
the issue is likely that the associated .h and .cpp files are incorrectly coded. unfortunately, without the actual code, it is hard to tell how and what the fixes should be.

user33246: I Have found the answer (by mistake)
i have added the includes to Boiler.cpp file
#include "RF24.h"
#include "RF24Network.h"
#include "RF24Mesh.h"
#include <SPI.h>
.
.
.
#include "Boiler.h"

RF24 radio(7, 8);                                   // Init RF24 Radio
RF24Network network(radio);                         // Init RF24 Network
RF24Mesh mesh(radio, network);                      // Init RF24 Mesh

Boiler::Boiler(int pin ,float Rev , String Last )
{
    _pin = pin;
    dev.setDevice(_pin);                    // Set Device Output (on/off)
    turnOff();
}

void Boiler::init( char nodeID)
{
    _nodeID = nodeID;
    // Connect to the mesh and set Node ID
    mesh.setNodeID(_nodeID);
    if (_DEBUG) Serial.println(F("Connecting to the mesh..."));
    mesh.begin();

    // init LCD and print init data on LCD
    myGLCD.InitLCD(60);                         // Init LCD 55 contrast
    myGLCD.setFont(SmallFont);                  // Set small font
    myGLCD.clrScr();                            // clr screen
    myGLCD.print("Boiler Device",0,0);          //Print init Data on screen
    myGLCD.print("Rev :" , 0 , 10);
    myGLCD.printNumF(_rev,1 ,35,10,'.',1,'0');
    myGLCD.print(_last,0,40);
    myGLCD.update();                            // Update display


    turnOff();
}

and now it compiles ;-)  

33246: <p>I'm writing library for smart home arduino DIY project.<br>
i want to use another library(not written by me).<br>
here is the code:  </p>

<p>boiler.cpp</p>

<pre><code>#include "Boiler.h"

Boiler::Boiler(int pin)
{
    _pin = pin;
    dev.setDevice(_pin);                    // Set Device Output (on/off)
    turnOff();
}
</code></pre>

<p>boiler.h  </p>

<pre><code>#ifndef BOILER_H_
#define BOILER_H_

// include RF24 libs
#include "RF24.h"
#include "RF24Network.h"
#include "RF24Mesh.h"
#include &lt;SPI.h&gt;

// SmartHome Lib Includes
#include "Device.h"
#include "TimerOne.h"
#include "timeSet.h"



class Boiler 
{

    private:

        RF24 radio(7, 8);
        RF24Network network(radio);
        RF24Mesh mesh(radio, network);

        int _pin ;

        void timerIsr();
        void DrawSCR();
    public:
        .
        .
        .

        Boiler (int pin );
        void turnOn();
        void turnOff();
};
</code></pre>

<p>The problem is it's not compiling<br>
the error I get is :<br>
Boiler.h: 32:14: error: expected identifier before numeric constant<br>
RF24 radio(7, 8)  </p>

<p>What am i doing wrong?
Thanks,</p>
 30005: <blockquote>
  <p>What am i doing wrong? </p>
</blockquote>

<p>without seeing those includes, it is hard to tell.</p>

<p>I can say is that your original code, with the includes in boiler.h, is the right approach.</p>

<p>the revised code, which doesn't give you the error message, it not the right approach.</p>

<p>the issue is likely that the associated .h and .cpp files are incorrectly coded. unfortunately, without the actual code, it is hard to tell how and what the fixes should be.</p>
 33246: <p>I Have found the answer (by mistake)<br>
i have added the includes to Boiler.cpp file</p>

<pre><code>#include "RF24.h"
#include "RF24Network.h"
#include "RF24Mesh.h"
#include &lt;SPI.h&gt;
.
.
.
#include "Boiler.h"

RF24 radio(7, 8);                                   // Init RF24 Radio
RF24Network network(radio);                         // Init RF24 Network
RF24Mesh mesh(radio, network);                      // Init RF24 Mesh

Boiler::Boiler(int pin ,float Rev , String Last )
{
    _pin = pin;
    dev.setDevice(_pin);                    // Set Device Output (on/off)
    turnOff();
}

void Boiler::init( char nodeID)
{
    _nodeID = nodeID;
    // Connect to the mesh and set Node ID
    mesh.setNodeID(_nodeID);
    if (_DEBUG) Serial.println(F("Connecting to the mesh..."));
    mesh.begin();

    // init LCD and print init data on LCD
    myGLCD.InitLCD(60);                         // Init LCD 55 contrast
    myGLCD.setFont(SmallFont);                  // Set small font
    myGLCD.clrScr();                            // clr screen
    myGLCD.print("Boiler Device",0,0);          //Print init Data on screen
    myGLCD.print("Rev :" , 0 , 10);
    myGLCD.printNumF(_rev,1 ,35,10,'.',1,'0');
    myGLCD.print(_last,0,40);
    myGLCD.update();                            // Update display


    turnOff();
}
</code></pre>

<p>and now it compiles ;-)  </p>
