How to send attachment using TIdyAttachment ?
How to convert this TIdAttachment.Create(msg.MessageParts, 'c:\attach.bmp'); delphi statement to c++ builder ?
How to use this abstract class in c++ builder? Due to it’s being abstract I cannot create an instance of it !!!
Note that
TIdAttachmentis indeed abstract (as Remy Lebeau noted in a comment). UseTIdAttachmentFileinstead. In C++, I guess it should look like (Update: I see you already found that):FWIW, named constructor calls like
TMyClass.Create(args)in Delphi are translated asnew TMyClass(args)in C++Builder. That is why Delphi often overloadsCreate, instead of using differently named constructors likeCreateWithSpecialParams. In Delphi, a constructor can have any name, but not in C++.Note that in Delphi you can have a
constructor Create(Integer)and aconstructor CreateEx(Integer)and they are distinguishable. This is not translatable to C++Builder, since both translate toMyClass(int), so doing that should be avoided if the Delphi programmer wants his or her class to be usable in C++Builder.