error: expected constructor, destructor, or type conversion before 'class'

AEIDWhat's that?

#include <SoftwareSerial.h> #define SerialIn 2 #define SerialOut 7

Nope.

#include <SoftwareSerial.h> 
#define SerialIn 2 
#define SerialOut 7

Yup.