cpp file:
#include "currency.hpp"
currencyNames[4] = {"gbp","usd","eur","aud"};
QComboBox *box1 = new QComboBox();
int i;
for(i=0; i < 4; i++){
QString *s = QString::string(currencyNames[i]);
box1->addItem(s);
}
hpp file:
#pragma once
#include string
.
.
.
static const int SIZE = 4;
std::string currencyNames[SIZE];
I keep getting a number of errors, I want an array containing the information above then loop through the array adding it to the QComboBox. Have no success. All relevant Qt headers included.