How convert c++ code ?

Please discuss general Delphi programming topics here.

How convert c++ code ?

Postby sesilla » 11/12/10 14:20

Hi all,

i have a problem, it's possible to convert this c++ code into delphi. Any chance or workaround?

Code: Select all
list<Vector2> vList;
const Vector2 vMin = 1.2f;
const Vector2 vMax = 8.9f;

list.clear();
for (float y = vMin.y; y<=vMax.y; y+=1.0f)
{
    for (float x = vMin.x; x<=vMax.x; x+=1.0f)
    {
   outList.push_back(Vector2(x, y));
    }
}


Thanks in advance
Sesilla
sesilla
Member
Member
 
Posts: 1
Joined: 11/12/10 14:17

Re: How convert c++ code ?

Postby programador » 16/11/11 09:51

Code: Select all
var
vList:tlist<Vector2>;
x,y:float;
const
vMin:Vector2  = 1.2f;
vMax:Vector2 = 8.9f;
begin

for y: = vMin.y to vMax.y Step 1.0f do begin
    for x: = vMin.x to vMax.x Step 1.0f do begin
        outList.push_back(Vector2(x, y));
    end;
end;

end;

programador
Member
Member
 
Posts: 1
Joined: 16/11/11 09:36


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 0 guests