Hai guys,
I am a newbie here, maybe you know about my problem.

this is VB source code :
ReDim parent.Individuals(maxPop) As Individual
ReDim offspring.Individuals(maxPop) As Individual
Do While bil < maxPop
bil_gen = 0
ReDim parent.Individuals(bil).Gen(batas_gen) As Genetik
parent.Individuals(bil).Genome = AssignValue(1)
List3.AddItem parent.Individuals(bil).Genome

bil = bil + 1

now, I use Qt that little different with VB.
I don't know how to make "ReDim" in "C". Do you know ??
Thanx for all your help

Recommended Answers

All 4 Replies


can you tell me more about it ???

can you tell me more about it ???

Yes, but I'll give you a better option since realloc is generally not a good idea in C++. Use a std::vector object instead of an array, then you can call the resize member function.

can you tell me more about it ???


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.