CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: pdk5

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    5
    Views
    57

    Re: optionally enable the params

    Very strange, when i try to assign the base class pointer to object of new derived type:

    m_pCovCellInfo = new NewPixelCovCellInfo[pSim->m_pixelList.GetTotalCovCells()];

    I get error saying...
  2. Replies
    5
    Views
    57

    Re: optionally enable the params

    Now the old pixelcov info is being used in another class :


    class CSimPixDataCache //: public ISimPixel
    {
    public:
    CSimPixDataCache(CSimulator* pSim);

    ::::::::::
    private:
  3. Replies
    5
    Views
    57

    Re: optionally enable the params

    Thanks a lot Victor and kaud.

    This is burried somewhere deep in the legacy code. The issue is that the number of pixels is ususally huge .

    So for each pixel , we store the above legacy fields ....
  4. Replies
    5
    Views
    57

    optionally enable the params

    Hello ,
    In the following class



    class PixelCovCellInfo
    {
    :::::::::::::::::

    private:
  5. Replies
    2
    Views
    47

    Re: reading multiple lines into arrays

    Thanks a lot kaud.

    Sorry for not doing proper home work

    I was googling yesterday (reg emplace_back ), and i think i need , vector of vectors for emplace_back to work :



    ...
  6. Replies
    2
    Views
    47

    reading multiple lines into arrays

    Hello,

    I am just starting to solve a problem, with multiple arrays, something like:

    2,2
    1,2,3,4
    6,7,8,9,10
    0,2
    1,1
  7. Replies
    2
    Views
    153

    Re: split string function

    Thanks a lot kaud :)
  8. Replies
    2
    Views
    153

    split string function

    Hi,

    I was trying to practice my coding , and found the following code for splitting string and finally use those to convert to integer and get sum of those numbers.

    I found the split string is...
  9. Replies
    2
    Views
    453

    Re: template deduction

    Thanks a lot kaud
  10. Replies
    2
    Views
    453

    template deduction

    Hello,

    I have following piece of template code,


    void PredictionRaster::AutoSetSetIllegalValueIfRequired(PRED_DATA_TYPE pdt, AIBaseRaster *pRaster)
    {
    ASSERT(pRaster);
    if (!pRaster)
    {
  11. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    @kaud: Sorry for not being very clear, when input is exactly 0x0001, the output elements are:
    i.e
    usRank1elt = 1;
    usRank2elt = 1;
    usRank4elt = 1;
    usRank8elt = 1;
    usRank16elt = 1;...
  12. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Thanks a lot everybody for your valuable comments and inputs. Very much appreciated.

    @wolle: The switch case (of if else ) is needed, just for efficiency. But otherwise, both values will work for...
  13. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    yes, Thanks a lot kaud. :) .
    I was trying to see if i can use bitset for my function. i.e why i thought, if there was some member function, which can return some bits only , would have been useful...
  14. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Thankyou again kaud for the links provided.

    Btw, bitset operator[] just returns one bit. It would have been helpful to specify the number of bits, ( like position and size) . Will look further....
  15. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Thanks a lot kaud for all the help. your time and patience. Not sure how i can repay for the all help i received here !!! Very much appreciated.
  16. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Sorry for above post :) . Because of lack of sleep, i am not in good state today :)
  17. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Now we are here discussing about this: I wanted to check if my check for LSB is correct:

    uint16 value = 0x00ff;

    if i consider the layout of value : 1111 1111 0000 0000

    The stored LSB is 0....
  18. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Thankyou very much kaud !!! . Very helpful .

    Thanks a lot for your time to make me understand
  19. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Sorry corrected it Victor. thanks
  20. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    As per post #10:

    i.e uint16 num = 0x00ff;

    0x00ff is stored as :
    low address 1111 1111
    high address : 0000 0000

    right shift should have resultedd in : 0111 1111 1000 0000 (0x7f10)
    But...
  21. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Thankyou very much kaud. That data is provided by third party. I guess, in that case needs to discuss with them.
  22. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Thanks a lot kaud.

    Assuming it is little endian, then my code (the last post, with shift lefts) wont work !!! But when i tested it works !!

    eg
    int main() {

    uint16 x = 0x00ff;

    uint16 y...
  23. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    @kaud: Now i have a doubt, will endianess, affect my shifting as it is 2 bytes .
  24. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    Found a bug in my previous code: Modified one is :



    unsigned short usEncodedRank (0x02);
    unsigned short usRank1elt(0), usRank2elt(0), usRank4elt(0), usRank8elt(0), usRank16elt(0),...
  25. Replies
    34
    Views
    3,483

    Re: switch case or if else ?

    I wrote a sample program using the bitfields:



    #include "stdafx.h"

    #include <iostream>
    using namespace std;

    struct S {
Results 1 to 25 of 312
Page 1 of 13 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)