zoukankan      html  css  js  c++  java
  • c++和delphi语法对比


    上排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 '); 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

  • 相关阅读:
    继承中类的作用域
    访问控制与继承
    虚函数与抽象基类
    定义基类和派生类
    类成员指针
    固有的不可移植特性
    局部类
    union
    嵌套类
    枚举类型
  • 原文地址:https://www.cnblogs.com/fply/p/14296239.html
Copyright © 2011-2022 走看看