How convert c++ code ?

Please discuss general Delphi programming topics here.

How convert c++ code ?

Postby sesilla » December 11th, 2010, 2:20 pm

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: December 11th, 2010, 2:17 pm

Re: How convert c++ code ?

Postby programador » November 16th, 2011, 9:51 am

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: November 16th, 2011, 9:36 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron