Search:

Type: Posts; User: Sajas K K

Search: Search took 0.01 seconds.

  1. Enumeration of enums. Is there a way to attain something like this.

    I am working on a client server based communication protocol stack.
    I have a list of errors that could occur during the course of communication
    Like,



    Errortype [1]
    Type1 ...
  2. Call a function that accepts char * as const char *&.

    Can i have something like a reference to pointer that can change the pointer but not the value in the pointed location.


    void fail(const char *& i)
    {
    i++;
    }


    int main()
  3. Encoding a data structure based on TLV encoding

    I have to encode the parameters present inside a structure based on X.690 encoding.
    Suppose, my structure is:

    struct Data_Struct
    {
    parameter1
    parameter2
    parameter3
    ...
  4. Replies
    7
    Views
    983

    But there is partial specialization as well,...

    But there is partial specialization as well, right? Like:

    template<class T> void func(complex<T>)
  5. Replies
    7
    Views
    983

    Thanks for pointing out my mistake.. I thought it...

    Thanks for pointing out my mistake.. I thought it was specialization of the template to work on pointers..
  6. Replies
    7
    Views
    983

    Sorry for asking such adumb question. I got the...

    Sorry for asking such adumb question. I got the answer. It seems to specialize the template. Don't know how to delete a thread. Sorry about that..
  7. Replies
    7
    Views
    983

    Specialing template for pointers

    Is the template :
    template<class T> void function1(T* t); a specialization of the template:
    template<class T> void function1(T t); ?. Do I have to specialize it for void* and derive from it?
  8. Hi, Few mistakes I found in your code were: 1....

    Hi,
    Few mistakes I found in your code were:
    1. You haven't closed your destructor correctly. You have just closed the while loop but not the destructor.
    2. While pushing, Shouldn't it be
    ...
  9. Thanks.. And Sorry.. For asking such a stupid...

    Thanks.. And Sorry.. For asking such a stupid question.. What i wanted in my project was to change the address pointed to by the pointer.. I could have just returned a reference to the pointer, like...
  10. Function as left hand operator error when returning pointer..

    int * p=new int();
    int* function ()
    {
    *p=10;
    cout<<"old p :"<<*p<<endl;
    return p;
    }
    int main()
    {
    int c=25;
  11. Thank you.. I ran the code in code block. It...

    Thank you..
    I ran the code in code block. It worked.
  12. Thanks for the reply.. Is this how the...

    Thanks for the reply..



    Is this how the above step is to be done:


    void f() //Unexpected exception handler
    {
    cout<<"Unexpected handler"<<endl;
  13. Catching exceptions thrown from constructor of a global instance of a class

    I know that having global variables is not appreciated. But in the book, The C++ programming language, by Bjarne Stroustrup, Author says that " The only way to gain control in case of throw from an...
Results 1 to 13 of 13