delphi 与 C++

C++——delphi

声明变量:

int i--i :integer;

int * a--a: ^integer;

int**a--a:^^integer;

int a[10]-- a: array[0..10] of integer;

string  a--a : string\a: string[255];

char* a  --a:pchar;

声明函数:

void     a(){}————procedure  a();begin    end;

int      a(){}————function    a():integer ;begin  end; 

void  *a()  ————a  :=procedure  b();

int  *a(int)————a :=function  b(c: intger):integer;

运算符

=——:=

==——=

& ——and

|——or

!=——<>

*——@

delphi没有指向符,没有逻辑运算符

delphi没有宏定义;

文件操作:

c++:

打开 Open\fopen\fstream\FIle类:

         open:底层函数,打开以文件描述符形式,可直接调用 0,1,2输入,输出,错误;stdin,stdout,stderr;      wirte,read,close;

               open可打开任意文件,可选择以流或者以文本形式;在dup的时候特别好用;

         fopen:返回文件结构体指针,fwrite,fread ,fclose;

        fstream以流的形式写入;重载过cout,cin;ostream写入;

        {

                  istream ins;

                  ins.cin<<"djdjsjdfjsdfhsdfh";

         }

file为上层函数类,以Unicode编码;

delphi:

createfile\ textfile类\Tinifile类\....:构造函数;

文件夹操作:

c++  _findfirst\FINDFIRST———__findnext\FINDNEXT;

delphi FindFirst ——FindNext;

              

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值