Results 1 to 3 of 3

Thread: Syntax: operator T & () const;

  1. #1
    cherish22 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    209
    Rep Power
    4

    Default Syntax: operator T & () const;

    Hi,

    I do not write:

    Code:
    1.	operator T & () const;
    Usually when you overload an operator we write:

    Code:
    1.	bool operator = (int a)
    There it nor have no return type and type operator after need explanation.

  2. #2
    ponting77 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    217
    Rep Power
    4

    Default

    It was an opera to cast. If you have a class A and you want IMPLIED allowed his cast to B, you set an operator of the form.

    operator B (). Only for the name of the operator is the return type.

  3. #3
    Priscila king is offline Member
    Join Date
    Jun 2009
    Posts
    46
    Rep Power
    0

    Default

    I used this some time ago already, to make co-simulation and co-verification. It works well, is multi-platform, and to make the simulation equipment is _excellent_.

Similar Threads

  1. the ternary operator in java program
    By WilsonMartin in forum Programming
    Replies: 1
    Last Post: 01-28-2010, 06:07 PM
  2. pb compiling operator + +
    By mike iglesias in forum Programming
    Replies: 5
    Last Post: 10-11-2009, 12:48 PM
  3. Pointer Syntax in C++
    By sheldon in forum Programming
    Replies: 0
    Last Post: 10-05-2009, 12:21 PM
  4. Command Syntax Elements
    By Cadmus4778 in forum Everything Else
    Replies: 0
    Last Post: 11-29-2008, 09:57 AM
  5. Syntax
    By techno23 in forum Programming
    Replies: 0
    Last Post: 03-26-2008, 12:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48