Could somebody help me to convert this Pascal source into C++:
unit Wr_Fluid;
interface
uses Crt,IOGraph,Fluid,Objects,WriS1;
var
Space :SpaceFile;
Tim :TimeFile;
procedure WriteSpace;
procedure WriteTim(T:double);
implementation
var Num,Num1 :integer;
procedure WriteSpace;
var
Lst_HstTim,Cnt,ImpLast :single;
All_OutPnt,Count,Comp,OutPnt,i,j :integer;
begin
Space.Assign(OutFile(SpaceMask),W_Mode);
Space.WriteFl(E,SizeOf(E),'E',_single);
Space.WriteFl(Rs,SizeOf(Rs),'X',_single);
Space.WriteFl(Fi,SizeOf(Fi),'Fi',_double);
Space.WriteFl(Vix,SizeOf(Vix),'Vix',_single);
Space.WriteFl(Nd,SizeOf(Nd),'Nd',_single);
Space.WriteFl(Ni,SizeOf(Ni),'Ni',_double);
Space.WriteFl(Qd,SizeOf(Qd),'Qd',_single);
Space.WriteFl(GirdArray2(f_visc^),SizeOf(f_visc^),'f_v',_single);
for i:=1 to Ns do
E:=E*Qd;
Space.WriteFl(E,SizeOf(E),'El.f.',_single);
Space.WriteFl(Nec,SizeOf(Nec),'Nec',_single);
Space.WriteFl(Uk,SizeOf(Uk),'Uk',_single);
Space.Done;
end;
procedure WriteTim(T:double);
var i:word;
begin
Tim.WriteFl(T,'Time');
Tim.WriteFl(a0,'a0');
end;
end.
I really need it.Thanks!
unit Wr_Fluid;
interface
uses Crt,IOGraph,Fluid,Objects,WriS1;
var
Space :SpaceFile;
Tim :TimeFile;
procedure WriteSpace;
procedure WriteTim(T:double);
implementation
var Num,Num1 :integer;
procedure WriteSpace;
var
Lst_HstTim,Cnt,ImpLast :single;
All_OutPnt,Count,Comp,OutPnt,i,j :integer;
begin
Space.Assign(OutFile(SpaceMask),W_Mode);
Space.WriteFl(E,SizeOf(E),'E',_single);
Space.WriteFl(Rs,SizeOf(Rs),'X',_single);
Space.WriteFl(Fi,SizeOf(Fi),'Fi',_double);
Space.WriteFl(Vix,SizeOf(Vix),'Vix',_single);
Space.WriteFl(Nd,SizeOf(Nd),'Nd',_single);
Space.WriteFl(Ni,SizeOf(Ni),'Ni',_double);
Space.WriteFl(Qd,SizeOf(Qd),'Qd',_single);
Space.WriteFl(GirdArray2(f_visc^),SizeOf(f_visc^),'f_v',_single);
for i:=1 to Ns do
E:=E*Qd;
Space.WriteFl(E,SizeOf(E),'El.f.',_single);
Space.WriteFl(Nec,SizeOf(Nec),'Nec',_single);
Space.WriteFl(Uk,SizeOf(Uk),'Uk',_single);
Space.Done;
end;
procedure WriteTim(T:double);
var i:word;
begin
Tim.WriteFl(T,'Time');
Tim.WriteFl(a0,'a0');
end;
end.
I really need it.Thanks!