aaaaaaaaaaaa
代码改变世界

c++和delphi语法对比

2021-01-19 09:15  二进制乐谱  阅读(262)  评论(0编辑  收藏  举报

上排c++下排delphi

指针定义 char
* p; var p:^char; 指针成员 ^. -> 赋值语句 = := for 结构 for(i=1;i<100;i++) { } for i:=1 to 100 do begin end 循环结构 while(true) { } while(true) do begin end if结构 if(tr.a1==0) { } if(tr.a1=0) then begin OutputDebugString('11111\n'); end; 取地址 & @ addr 数组定义 char arry[200] daary:array[0..200] of char; typdef struct record { } RECORD; delphi 结构体 type tagPROCESSENTRY32 = record dwSize: DWORD; cntUsage: DWORD; th32ProcessID: DWORD; // this process th32DefaultHeapID: ULONG_PTR; th32ModuleID: DWORD; // associated exe cntThreads: DWORD; th32ParentProcessID: DWORD; // this process's parent process pcPriClassBase: LONG; // Base priority of process's threads dwFlags: DWORD; szExeFile: array [0..MAX_PATH - 1] of Char; // Path end;


 


不等于符号

!=
<>


内存申请
new malloc
getmem 类.create


内存释放
free
freememandnil

 

 

 

aaaaaaaaaaaaa