0

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
Loop

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
^^

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by WaltP
1

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.