Search:

Type: Posts; User: nappaji

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,266

    ---------- Thanks Salem.. i was guess i was...

    ----------

    Thanks Salem.. i was guess i was thinking hex 40.. so dumb of me. Thanks for explaining.
  2. Replies
    2
    Views
    2,266

    bitwise OR unexpected result

    unsigned int a = 40;
    unsigned int mask = 1<<3;
    unsigned int b = a | mask;
    printf ("%d", b);

    I have the above code and was expecting a result of 48 for b, but I get an output of 40.

    if I use...
  3. The classes dont have much in common, hence did...

    The classes dont have much in common, hence did not consider inheritance. Moreover only one of them will be used at any instance.
    void * is to point to objects, not class.
  4. thanks for the response. yes, it will point to...

    thanks for the response.

    yes, it will point to the object of the class.
    i should have named it as "void * objptr;"

    Yes, having the objects is one solution; or better have the pointers and...
  5. void class pointer in class definition -design alternatives?

    I have a design related question.
    Say I have 2 classes, class A and class B
    I havea third class classMain, where I want to use wither classA or classB at runtime based on some parameters.

    I am...
  6. Replies
    4
    Views
    2,288

    passing array of type struct to function

    typedef struct stA
    {
    int a,b;
    };

    main()
    {
    stA elems[] = {{10,10},{20,20},{30,30}};
    func(elems);
    }
  7. Replies
    4
    Views
    2,898

    Overloading [] operator for a vector

    Here is a snippet of code;
    I want to overload the [] operator such that, when I try to do something like
    vCont[i]->name
    it should check the mask against Contmask and take specific action.
    ...
  8. Replies
    2
    Views
    3,053

    Thanks Bench32 ; the first solution will work for...

    Thanks Bench32 ; the first solution will work for me
  9. Replies
    2
    Views
    3,053

    C2061 error in header file

    In the code (.h file)below, I am creating a class clsA with a constructor.
    Then, I am declaring another class clsB, which always will have 2 instances of clsA.
    I am getting the C2061 error
    ...
  10. Replies
    1
    Views
    2,386

    large binary number division

    Hello,
    I am trying to divide a large binary number (54 bits) with another binary number (10 bits). Can some one please suggest what would be the fastest (in terms of execution speed) way to...
  11. Replies
    3
    Views
    8,254

    large binary number division

    Hello,
    I am trying to divide a large binary number (54 bits) with another binary number (10 bits). Can some one please suggest what would be the fastest (in terms of execution speed) way to...
  12. i dont think so... i have been programming in C...

    i dont think so... i have been programming in C for the past few years and have always used a ".h" as a header extension.

    Standard C headers are distinguished from user header files in the way...
  13. Replies
    160
    Views
    1,221,078

    Sticky: Expert C Programming - Deep C Secrets...

    Expert C Programming - Deep C Secrets by Peter Van der Linden is a very good book but not for beginners.

    Can look complicated sometimes but very useful in getting a solid understanding...
Results 1 to 13 of 13