Usage of _ property

Source: Internet
Author: User

// ----------------------------------------------------------------------------- <Br/> # include <vcl. h> <br/> # pragma hdrstop <br/> # include <iostream> <br/> using namespace std; <br/> // construct <br/> # pragma argsused <br/> class A //: public TObject <br/>{< br/> private: <br/> int Fx; <br/> AnsiString name; <br/> void _ fastcall sWrite (AnsiString stext); <br/> AnsiString _ fastcall sRead (); <br/> public: <br/> void _ fastcall show (); <br/> // _ published: _ published or _ automated sections only supported for VCL classes <br/> _ property AnsiString str = {read = sRead, write = sWrite }; <br/> _ property int X = {read = Fx, write = Fx };< br/>}; <br/> void _ fastcall A: show () <br/>{< br/> cout <"It is show ()" <endl; <br/>}< br/> AnsiString _ fastcall :: sRead () <br/>{< br/> cout <"now in sRead" <endl; <br/> return name; <br/>}< br/> void _ fastcall A: sWrite (AnsiString stext) <br/>{< br/> cout <"now is sWrite" <endl; <br/> name = stext; <br/>}< br/> int main (int argc, char * argv []) <br/>{< br/> A a; <br/> AnsiString str; <br/>. str = "hello"; <br/> str =. str; <br/> system ("pause"); <br/> return 0; <br/>}< br/> // else <br/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.