error in library file

An error occurred when i tried to upload the file into arduino atmega2560. Below is one of the library files where the error is highlighted at.
The error says:

herkulex.h:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'herkulex'
herkulex.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
herkulex.c:166: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
herkulex.c:172: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
herkulex.c:194: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
herkulex.c:285: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token

And the 'class' word in this file is highlighted.

May I know what's wrong with this code? Thanks!

code:

#ifndef herkulex_lib
#define herkulex_lib

#include <Arduino.h>
#include <Wire.h> 
#include<inttypes.h> 

class herkulex
{
  public: 
    herkulex();
    void hklx_Init(unsigned long ulBaudRate);
    void hklx_SendPacket(DrsPacket stPacket);
    unsigned char hklx_ucReceivePacket(DrsPacket *pstPacket);
    void hklx_RemoveInvalidData(void);

//no private  
};

#endif /* HERKULEX_H_ */

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

DrsPacket is defined in your code.

Sorry do you mean that DrsPacket should be defined in this library?
It is a typedef struct that i defined in herkulex.c file.

I'm saying what you have posted is inadequate for the purpose of determining why you are having trouble compiling.

Sorry do you mean that DrsPacket should be defined in this library?
It is a typedef struct that i defined in herkulex.c file.

Why is it defined in the source file when it is referenced in the header file? If it is defined in the header file, it can be referenced in the source, but the opposite is not true.