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

Search:

Type: Posts; User: pdk5

Page 1 of 19 1 2 3 4

Search: Search took 0.02 seconds.

  1. Thread: stl find

    by pdk5
    Replies
    12
    Views
    627

    Re: stl find

    Thankyou very much kaud.

    As of now, the A and B, contain just 1 to 64. It may change in future, so its ok as of now.
  2. Thread: stl find

    by pdk5
    Replies
    12
    Views
    627

    Re: stl find

    Thankyou very much for the idea Philip.

    @kaud : thankyou very much. Is there any other ways to do this, using predicate may be. Also was wondering, if binary search can be used ?
  3. Thread: stl find

    by pdk5
    Replies
    12
    Views
    627

    Re: stl find

    Thankyou very much kaud.

    Yes, I needed exactly same logic.

    x1, x2, etc are "double" type.

    if we put them in a function to pass the index and the double type as output

    double GetValue(int...
  4. Thread: stl find

    by pdk5
    Replies
    12
    Views
    627

    Re: stl find

    Thankyou very much kaud.

    Sorry for delay

    vector A = {1,8,16,32,64}
    vector B={ x5, x4, x3,x2,x1}

    The function needs to check,
    - if the passed index , falls to 64 and above , Return value...
  5. Thread: stl find

    by pdk5
    Replies
    12
    Views
    627

    stl find

    Hello,

    I have a table like:

    index value
    -------------
    64 and more x1
    32 to 63 x2
    16 to 31 x3
    8 to 15 x4
  6. Thread: stl holder

    by pdk5
    Replies
    0
    Views
    295

    stl holder

    Hi ,

    There is a map,

    std::map<int, RepeaterInfo> m_mapLoadingID_to_RepeaterInfo;

    Currently, lets say we have antenna key and it gets converted to many Loading ids.. ( Almost all of loading...
  7. Replies
    3
    Views
    494

    Re: Reference to outer struct doesnot update

    sorry it was my mistake, they also defined new class in the m_pCurrentService also.. it looks like something wrong in design (it is there in two places)..getting updated one place..accessed somewhere...
  8. Replies
    3
    Views
    494

    Re: Reference to outer struct doesnot update

    Thanks a lot kaud, for looking into this and helping me
    Yes, it is reference (its legacy code)

    FiveGServiceParams& TGService::Get5gParams()
    {
    return m_5gParams;
    }
  9. Replies
    3
    Views
    494

    Reference to outer struct doesnot update

    Hello,

    I have a function:




    void FiveGServiceGeneralPage::SaveValues()
    {
    FiveGServiceParams& fivegParams = m_pCurrentService->Get5gParams();
  10. Replies
    11
    Views
    1,969

    Re: casting pointer to template type

    Thanks a lot kaud, there was function i could call to get the output array. And that i passed and now it works ok !!.
  11. Replies
    11
    Views
    1,969

    Re: casting pointer to template type

    thanks a lot kaud. But the function im calling (RenderNewSimOutput) is legacy

    in my case, iOutIndex will just be "0", as its just one pixel




    bool...
  12. Replies
    11
    Views
    1,969

    Re: casting pointer to template type

    i.e true, because output can be int or float..

    if out is int, rfp.piOut is used
    if float rfp.pfOut is used

    in our case it is float..(not array)
  13. Replies
    11
    Views
    1,969

    Re: casting pointer to template type

    Thanks a lot kaud..

    Im seeing somewhere else in legacy code, (for getting int value)

    int iVal = 0;
    OnePixel<int> iraster(&iVal);

    RenderFuncParams rfp;...
  14. Replies
    11
    Views
    1,969

    Re: casting pointer to template type

    Thanks a lot kaud. Yes, i will check with my collegues about this.

    But now, Im facing issue further on: somehow, the passed reinterpret cast pointer is not able to be written

    Actually, i am...
  15. Replies
    11
    Views
    1,969

    Re: casting pointer to template type

    Thankyou very much kaud !!!. Yes it compiled like magic :)

    I was some short break and now back to work and i feel like i have forgotten little bit c++ i knew..

    thanks a lot again.. i am sorry...
  16. Replies
    11
    Views
    1,969

    casting pointer to template type

    Hello.

    I have another circular dependency issue, so was trying to handle by changing the variable access, to pointer type.

    But the pointer is for templated class.

    Basically i had

    ...
  17. Replies
    14
    Views
    1,764

    Re: New file inclusion problem on legacy code

    Thankyou very much kaud. As per your advice i have used optional now
    (sorry for the delay response,)
  18. Replies
    14
    Views
    1,764

    Re: New file inclusion problem on legacy code

    May be otherway is pass it function param as reference and return a bool (to tell if its valid )!!!
  19. Replies
    14
    Views
    1,764

    Re: New file inclusion problem on legacy code

    @Victor thanks a lot for the response.
    Yes, i.e what was discussed during design. It makes it easier, to check if it is valid, by checking if its null_ptr !
    Also makes it consistent with the...
  20. Replies
    14
    Views
    1,764

    Re: New file inclusion problem on legacy code

    Thanks a lot kaud. I think most probably this issue is now resolved :) . I had included "simulator.h" in the FWAInfo.h. As I had moved all function definitions, into the .cpp, I could remove that .h....
  21. Replies
    14
    Views
    1,764

    Re: New file inclusion problem on legacy code

    Hi Kaud,

    Sorry i didnot have time to look further into this issue. Just to simplify the issue

    I have added a new file called FWAInfo.h which has two classes: FWAPoint and CFWAInfo

    Now in the...
  22. Replies
    14
    Views
    1,764

    Re: New file inclusion problem on legacy code

    Thanks a lot kaud. Btw, I created the FWA.cpp and moved most of functions there. Now this issue is resolved.

    But it would be helpful, if we have any tools to show the inclusion order .. (when the...
  23. Replies
    14
    Views
    1,764

    Re: New file inclusion problem on legacy code

    Thanks a lot Victor and kaud.

    Actually, that function i was adding was not used as of now (so commented out) and moved on. But now facing similar issue.

    I never had this kind of file inclusion...
  24. Replies
    14
    Views
    1,764

    New file inclusion problem on legacy code

    Hello,

    I added a new class in the c++ header file and included in existing file. And it works ok, as expected :).

    I also have #pragma once in the new header file.

    Now I want to include in...
  25. Replies
    4
    Views
    2,271

    Re: Help in understanding the legacy code

    I dont have any documents regarding this, so need to go through this and find out whats happening.
    and i was thinking, if they had used vectors it would have been implemented.
Results 1 to 25 of 475
Page 1 of 19 1 2 3 4





Click Here to Expand Forum to Full Width

Featured