Semaphores Urgent

Hello,
Iam trying to implement the sleeping barber problem using semaphores and running on UNIX machine. Iam linking it to the thread libraries :
bash-2.03$ g++ sleepingBarber.cpp -lpthread -o sleeping

but when i execute it i get the following error:
bash-2.03$ sleeping
Starting Program
Segmentation Fault (core dumped)
:

Please Help. Here is the code:

#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/wait.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<sys/ipc.h>
#include<sys/shm.h>
#include<synch.h>
#include <pthread.h> 
#include<iostream>
#include<pthread.h>

const int totalChairs = 15;
int waiting = 0;
int finished = 0;
//Binary Semaphores   - mutex,barber
//Counting Semaphores - customers, cutting
struct semaphores
{
    sema_t mutex, barber, customers, cutting;
};
static semaphores * Semaphores;
void cut_hair()
{
    //P(cutting)
    sema_wait(&(Semaphores->cutting));
}
void get_haircut(int custNum)
{
    //V(cutting)
    cout<<" BARBER CUTTING HAIR OF CUSTOMER "<<custNum<<endl;
    sema_post(&(Semaphores->cutting));
    sleep(3);
}
void *Barber(void* ignore)
{
    while(!finished)
    {
        sema_wait(&(Semaphores->customers)); //Sleep if no customers P(Customers)
        cout<<" Barber Sleeping!"<<endl;
            sema_wait(&(Semaphores->mutex));        //Get access to waiting V(mutex)
            waiting--;                //Choose a customer
            sema_post(&(Semaphores->barber));    //barber busy V(barber)
            sema_post(&(Semaphores->mutex));        //Release access to waiting V(mutex)
            sleep(3);
            cut_hair();
        
    }

}
void *Customer(void *num) 
{ 
    int custNum = *(int *)num; 
    
    cout<<"Customer "<<custNum<<" Arrives"<<endl;

    sema_wait(&(Semaphores->mutex));            //Enter Critical Section P(mutex)
    
    if(waiting < totalChairs)
    {
        waiting++;
        sema_post(&(Semaphores->customers)); //Wake up barber V(Customers)
        sema_post(&(Semaphores->mutex));        //Release access to waiting V(mutex)
        sema_wait(&(Semaphores->barber));    //Wait if barber busy P(barber)
        get_haircut(custNum);                        //Get in chair be serviced
        cout<<"[c] Customer "<<custNum<<" got a haircut"<<endl;
        exit(1);
    }
    else
    {
        cout<<"[c] Customer "<<custNum<<" Returns as shop is full"<<endl;
        sema_post(&(Semaphores->mutex));        //Release access to waiting V(mutex)
        exit(1);
    }
    
}
void initializeSemaphores()
{
    sema_init(&(Semaphores->mutex),1,USYNC_PROCESS,NULL);
    sema_init(&(Semaphores->barber),0,USYNC_PROCESS,NULL);
    sema_init(&(Semaphores->customers),0,USYNC_PROCESS,NULL);
    sema_init(&(Semaphores->cutting),0,USYNC_PROCESS,NULL);
}
int main()
{
    
    cout<<"Starting Program"<<endl;
    //Initialize the semaphores
    initializeSemaphores();

    pthread_t barberThread,customerThread[totalChairs];
    pthread_create(&barberThread, NULL, Barber, NULL); 
    for (int i=0; i<totalChairs; i++) 
    { 
        pthread_create(&customerThread, NULL, Customer, (void *)&i); 
    } 
    for (int i=0; i<totalChairs; i++) 
    { 
        pthread_join(customerThread,NULL); 
    } 
    pthread_join(barberThread,NULL);
    finished = 1; 
    sema_post(&(Semaphores->barber)); // Wake the barber so he will exit. 
    pthread_join(barberThread,NULL);

    
}

Really appreciate it.

$ gdb a.out
...
(gdb) run
Program received signal SIGSEGV, Segmentation fault.
0xff3b0878 in memset () from /usr/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1
(gdb) bt
#0  0xff3b0878 in memset () from /usr/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1
#1  0xff1de7d4 in sema_init () from /usr/lib/libthread.so.1
#2  0x0003db28 in initializeSemaphores () at t.cxx:82
#3  0x0003dbe4 in main () at t.cxx:92
(gdb) list
81      {
82          sema_init(&(Semaphores->mutex),1,USYNC_PROCESS,NULL);
83          sema_init(&(Semaphores->barber),0,USYNC_PROCESS,NULL);

(gdb) p Semaphores
$1 = (semaphores *) 0x0
(gdb) quit

Thank you for reviewing it binlib,
But iam not able to get the error. Could you please elaborate.

"semaphores" is a null pointer. You never allocate any memory for it.

Yes i figured that one out. thank you though