title: Global Classes in C++
body: <p>Im trying to create a global class so I can access it anywhere, but it's not working, I get the error:</p>
  
  <pre><code>a storage class can only be specified for objects and functions
  </code></pre>
  
  <p>Does anyone know where I'm going wrong?</p>
  
  <p>Here is my h file:</p>
  
  <pre><code>extern class Payments : public QObject
  {
  Q_OBJECT
  public:
      Payments(QObject *parent = 0);
      virtual ~Payments();
      void purchase(const QString &amp;id, const QString &amp;sku, const QString &amp;name, const QString &amp;metadata);
      void getExisting(bool refresh);
      void getPrice(const QString &amp;id, const QString &amp;sku);
  
  public slots:
      void purchaseResponse();
      void existingPurchasesResponse();
      void priceResponse();
  
  signals:
      void purchaseResponseSuccess(const QString &amp;receiptString);
      void existingPurchasesResponseSuccess(const QString &amp;receiptsString);
      void priceResponseSuccess(const QString &amp;price);
      void infoResponseError(int errorCode, const QString &amp;errorText);
  
  
  private:
      bb::platform::PaymentManager *paymentManager;
  
  };
  </code></pre>