Sptr<CallId> myId meaning

This is a discussion on Sptr<CallId> myId meaning within the C++ Programming forums, part of the General Programming Boards category; I know what this means: int a; --declare a storage to store an integer But what does this means: Sptr<CallId> ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    2

    Sptr<CallId> myId meaning

    I know what this means:

    int a; --declare a storage to store an integer


    But what does this means:

    Sptr<CallId> myId ?

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    103

    Smile Its a Template

    I re-read my first post, felt it didn't really answer your question.. hence trying to make it much more simpler.....

    There are generic classes in C++ called template classes. You give the type of data this generic class will work with inbetween "<" and ">" and then specify the object name of the class.

    For example:
    There is a generic class called stack available in C++
    [ STL (Standard Template Library) ]

    If you wanted a stack that stores information of type int in it, you would say

    stack<int> ob;

    Here ob is a stack object that would store information of type int within it.

    If you wanted a stack that stores information of type double, you would say

    stack<double> ob1;

    Here ob1 is a stack object that would store information of type double within it.

    I hope this gives a brief insight into what a Template Class is and why it is also referred as a Generic Class

    Note: You have Generic / Template functions too
    Last edited by shiv_tech_quest; 01-09-2003 at 03:29 AM.
    Have a wonderful day.... and keep smiling... you look terrific that way
    signing off...
    shiv... as i know him

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. HELP!what is the meaning of "&" ???
    By zxlew in forum C Programming
    Replies: 2
    Last Post: 01-18-2009, 03:29 AM
  2. the meaning of " >> "
    By arian in forum C++ Programming
    Replies: 8
    Last Post: 03-30-2005, 10:40 AM
  3. The Meaning of Life: A Trick Question?
    By chix/w/guns in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 07-12-2004, 08:53 PM
  4. The meaning of "Duh"
    By Magos in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 02-26-2003, 01:46 PM
  5. would you help me with Linked list, please?
    By unhwan in forum C Programming
    Replies: 1
    Last Post: 06-11-2002, 01:24 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21