- Sep 15, 2005
- 3,622
- 1
- 0
In java I would have done:
Can I do the same thing in C++?
IF this is not the correct way to handle things, what can I do differently?
Code:
fillArray(myArray);
void fillArray(objArray myArray)
{
for(int x = 0 ; x < 5; x++)
myArray[x] = new Parameter("Description", "Name", "Value");
}
Can I do the same thing in C++?
Code:
QList<Parameter> parameters;
fillList(parameters);
void fillList(QList<Parameter>& myList)
{
for(int x = 0; x < 5; x++)
myList.append(new Parameter("Description", "Name", "Value");
}
IF this is not the correct way to handle things, what can I do differently?
Last edited: