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

Search:

Type: Posts; User: pdk5

Page 1 of 18 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    2
    Views
    270

    do while with find_if

    Hello,



    std::map<int, bool > m_TacToAssignFlag;

    auto itr = m_TacToAssignFlag.begin();

    do
    {
  2. Re: is it safe to use the bitwise XOR for boolean types (in c++)

    Thanks a lot Victor again , I'll check this, very helpful
  3. Re: is it safe to use the bitwise XOR for boolean types (in c++)

    Sorry i meant, i am newbie and learning.

    @Victor: It was so helpful to get inputs and help us think about the issues in depth. Any feedback and help is very much appreciated. I feel so valued and...
  4. Re: is it safe to use the bitwise XOR for boolean types (in c++)

    @kaud: Thankyou very much for the detailed explanation. Very helpful.

    Also thankyou wolle and victor for the inputs
  5. Thread: changing for loop

    by pdk5
    Replies
    4
    Views
    577

    Re: changing for loop

    Thanks a lot kaud.
  6. is it safe to use the bitwise XOR for boolean types (in c++)

    Hello

    lets a i have :

    bool a = true;

    bool b = false;

    is it safe to use
  7. Thread: changing for loop

    by pdk5
    Replies
    4
    Views
    577

    Re: changing for loop

    I came up with the following change, as of now works. But will be helpful to get some advice and suggestions



    {
    do {
    for (auto& [tac, sitekeys] : m_TacToUnassignedNeighSiteKeysList)...
  8. Thread: changing for loop

    by pdk5
    Replies
    4
    Views
    577

    Re: changing for loop

    Actually tried to test: Does not work:


    for (auto& [tac, sitekeys] : m_TacToUnassignedNeighSiteKeysList)
    {
    for( auto site : sitekeys)
    {
    AssignTacsForSite(site,...
  9. Thread: changing for loop

    by pdk5
    Replies
    4
    Views
    577

    changing for loop

    Hello,

    The changes i made sometime ago in the code, looks like doesnot handle all the scenarios.




    for (auto config : m_pTACWizData->m_TacPlanData.GetConfigData())
    {
    for (auto&...
  10. Re: replace the multiset with new set inside the existing map

    Thanks a lot kaud. I added
    m_SiteKeyToNeighbourKeys[sitekey] = neighkeys;
  11. replace the multiset with new set inside the existing map

    Hello,

    I have map of multiset. Now i filter the multiset , and comeup with new set.

    I want to replace the old multiset for that key with the filtered one.



    for (auto [sitekey,...
  12. Replies
    1
    Views
    536

    Re: help with the following code

    Moved to top of forloop works ok..thanks
  13. Replies
    1
    Views
    536

    help with the following code

    Hello,



    std::map<int, std::multiset<TACNeighbourData> >::iterator found = m_SiteKeyToNeighbourKeys.find(nTopParentKey);

    for (auto sneigh : sNeighbourKeys)
    {
    if (found...
  14. Thread: compile error

    by pdk5
    Replies
    3
    Views
    535

    Re: compile error

    Yes kaud :) thanks a lot . I found out soon after posting, but forgot to update the thread. Sorry for posting such thing here, it has been quite busy, . Very sorry about it. And thanks a lot
  15. Thread: compile error

    by pdk5
    Replies
    3
    Views
    535

    compile error

    Hello,

    With the following code:



    auto it = std::find_if(rLTENodes.begin(), rLTENodes.end(), [&cm=strCentralSite](const const MultiTechNode * m)->bool {return cm == m->GetID();});
  16. Re: find if any duplicates within the struct in a vector

    Thanks a lot kaud.

    Actually, i want to check, if the m_nId is unique and no duplicates.

    As this is not very big vector (may have atmost 10 elements) and the check is not done many times, i...
  17. Re: find if any duplicates within the struct in a vector

    Thanks a lot kaud.

    The vector is not sorted.
    I donot want to insert any values.

    But i want to kind of send a message to user that something is wrong in his entry. (It is assumed user is not...
  18. find if any duplicates in a vector of structs based on an attribute

    Hello,

    I have a vector of structs (or classes):
    std::vector<ConfigData>& vecConfigData;



    class ConfigData
    {
    public:
  19. Replies
    4
    Views
    294

    Re: Reopen the Dialog.

    Basically i was relooking into code, and wondering, after the CLOSE, the window is destroyed, but the handle is still having not deleted. Is it wrong ? So tried the following it works, but not sure...
  20. Replies
    4
    Views
    294

    Re: Reopen the Dialog.

    Thanks a lot Victor i tried it is not working.



    if (m_pResultAnalysisDialog)
    {
    WINDOWPLACEMENT windowPlace;
    windowPlace.length = sizeof(WINDOWPLACEMENT);
    BOOL bOk =...
  21. Replies
    4
    Views
    294

    Reopen the Dialog.

    Hi,
    As per discussion one month back, I tried to create the MFC dialog from the existing one. But now when trying to test various scenarios, i am facing the issue. Actually, the dialog is created...
  22. Replies
    2
    Views
    243

    Re: stl find_if iterator type

    Thankyou so much kaud for your patience to help me .

    Thanks a lot again.
  23. Replies
    2
    Views
    243

    stl find_if iterator type

    Hello,

    It is strage that that find_if for the vector returns normal iterator, but when i replace it with the set , it return const iterator.

    Basically, i wanted to change the content of the...
  24. Re: Removing the duplicates in the multiset (bit urgent)

    Thanks a lot kaud for the inputs, I'll try to change that and make efficient as you suggested. The initial design didnot consider all possibilities
  25. Re: Removing the duplicates in the multiset (bit urgent)

    I think i found a way, I just tried to check before the insertion, if that element is already present,




    struct find_by_cellkey {
    find_by_cellkey(const int & cellkey) : cellkey(cellkey)...
Results 1 to 25 of 432
Page 1 of 18 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)