CAN any one tell it whats the code tell it

Discussion in 'C++' started by yogesh, Mar 14, 2007.

  1. yogesh

    yogesh Guest

    i have a code as follows

    TServerDB() { fDB = Server()->dbStorage->Create(); }
    or
    fDB=TServer->TMySQLBD->Create();

    can any one tell the relationship between two


    and whats the <between > braces called

    class TSSIStorage: public TResourceStorage<m_ssi::TSSIControl>

    <m_ssi::TSSIControl> ---> this reference
    yogesh, Mar 14, 2007
    #1
    1. Advertising

  2. yogesh wrote:
    > i have a code as follows
    >
    > TServerDB() { fDB = Server()->dbStorage->Create(); }
    > or
    > fDB=TServer->TMySQLBD->Create();
    >
    > can any one tell the relationship between two


    Between? You mean what the difference is? Are you saying you
    cannot see the difference? One calls 'Server()' function (or
    constructs a temporary 'Server' object, depending on how the
    "Server" symbol is defined), the other uses [what seems to be]
    a pointer named 'TServer' (or an object of a class that has
    an overloaded operator ->). Also, one uses 'dbStorage' member
    and the other uses TMySQLBD member. The right parts of the
    assignment expression are slightly different, but the real
    difference between them cannot be explained here without seeing
    more code (especially how those 'Server', 'dbStorage', 'TServer'
    and 'TMySQLBD' things are defined.

    > and whats the <between > braces called
    >
    > class TSSIStorage: public TResourceStorage<m_ssi::TSSIControl>
    >
    > <m_ssi::TSSIControl> ---> this reference


    It's called "the template argument".

    What C++ book are you reading that doesn't explain all those
    relatively simple concepts?

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Mar 14, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brahmam
    Replies:
    1
    Views:
    363
    Scott M.
    Mar 28, 2006
  2. ravikirand72
    Replies:
    0
    Views:
    404
    ravikirand72
    Nov 22, 2006
  3. Replies:
    2
    Views:
    347
    Manish Pandit
    Nov 16, 2006
  4. Tianyi Chen
    Replies:
    4
    Views:
    391
    Greg R. Broderick
    May 8, 2007
  5. chanson
    Replies:
    2
    Views:
    593
    jeppe
    Oct 9, 2009
Loading...

Share This Page