Board index » cppbuilder » Translate C++ code to Delphi (pascal unit)... ........ not works in Delphi.
selamitsp
CBuilder Developer |
Translate C++ code to Delphi (pascal unit)... ........ not works in Delphi.2007-12-21 08:22:06 AM cppbuilder21 Hello ALL, [ This is Fatih Taspinar who is a college student major computer programming from Turkey. ] If you have enough time (i hope), i'd like to ask you something about converting a piece of C++ code to Delphi. I've attached a C++ file named CCL (CCL.c file ise doing connected component labeling and 8 neighbourhoods are applying). This program reads an ascii PBM image file (width and height are written on the 2nd line and White = 0, Black = 1) and then applies the CCL algorithm to find each objects in PBM file. I am using B/W 8 bit TBitmap object instead of a simple PBM file. I've translated it to Delphi (named ftCCL3.pas) but it did not run. It runs as I expect in C++ form (C++ Builder IDE) but not the code i've translated to pascal in Delphi IDE. I can not know (find) where i am wrong. All my tryings are failure. Just ConnectedComponentLabeling routine can be converted i'll be OK, other routines are already so simple. I've attached the files both mine and the orginal C++ file. Please, if you have some time to look at the code i've attached, i'll be so happy. (from trying to be an amateur programmer) Thanks for any advice, any help or any suggestion right from now. Sincerely Yours, Fatih Taspinar. |