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

Search:

Type: Posts; User: @EE@

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    840

    Re: wait .. no blocking

    why you do not use std::threads?. What are other alternatives based on your experiences?. Specially for passing array of objects to it in C++. I read _beginthread(ex) are appropriate for C++.
  2. Replies
    10
    Views
    840

    Re: wait .. no blocking

    This is what I mean?. Condition variables versus events.. ?
    https://en.cppreference.com/w/cpp/thread/condition_variable
  3. Replies
    10
    Views
    840

    Re: wait .. no blocking

    how about condition variables versus events?. Both work at kernel level?. Which is more proper to use?.
  4. Replies
    10
    Views
    840

    wait .. no blocking

    need examples of a proper way to wait for a flag change in another thread without blocking the events?. In C++/windows.
  5. Thread: array of objects

    by @EE@
    Replies
    14
    Views
    1,248

    Re: array of objects

    thank you 2kaud and others.
  6. Thread: array of objects

    by @EE@
    Replies
    14
    Views
    1,248

    Re: array of objects

    Is there a reason why the SetThreadPriority is removed by 2Kaud?. Maybe it is not genuine c++?? may actually run faster without it??.
    is the "writetoFile" thread safe?. I like to make sure the each...
  7. Thread: array of objects

    by @EE@
    Replies
    14
    Views
    1,248

    Re: array of objects

    I added threads to my array of objects. It crashes when main exits. Also, static member gives an error. not sure how to handle these two cases?.


    #include <iostream>
    #include <vector>
    #include...
  8. Replies
    4
    Views
    502

    Re: threads and function call

    Got multiple threads each with an instance of a class accessing a function Add. In what cases that kind of a function would be unsafe if accesses by multiple threads?. examples?.. I got to do more...
  9. Thread: array of objects

    by @EE@
    Replies
    14
    Views
    1,248

    Re: array of objects

    when program starts , after the first constructor call. ~MyClass() destructor is immediately called


    #include <iostream>
    #include <vector>
    #include <algorithm>
    using namespace std;
    ...
  10. Thread: array of objects

    by @EE@
    Replies
    14
    Views
    1,248

    Re: array of objects

    when using std::vector<MyClass> myobj(numofobjects, MyClass()); to create arary of objects , Myclass() destructor get called after its constructor and execution stops. with new it does not occur...
  11. Replies
    4
    Views
    502

    threads and function call

    if got an Add function in a shared header:

    int Add(int a, int b)
    {
    return a+b;
    }
    is it safe if multiple threads calling the Add function?. if not how to make it safe to avoid unexpected...
  12. Thread: array of objects

    by @EE@
    Replies
    14
    Views
    1,248

    array of objects

    Hi,
    When using vector to create array of object, the destructor gets called right after the constructor, but when i use new it works OK.
    std::vector<MyClass> myobj(numofobjects, MyClass());

    ...
  13. Replies
    3
    Views
    874

    Re: need help with threads

    No opinion on the last question?!:d
  14. Replies
    3
    Views
    874

    Re: need help with threads

    Works now.

    if got a Add function in a shared header:


    int Add(int a, int b)
    {
    return a+b;
    }
  15. Replies
    3
    Views
    874

    need help with threads

    Hi, I am newbie to managed c++.

    I need a code with main function that four threads run four instances of this class , Animal, simultaneously.
    Each instance prints a different animal kind....
  16. Replies
    2
    Views
    991

    Re: exporting Library functions to some Apps

    How about if DLL is exporting functions with such arguments, going to be used in all other non .Nets?. like in C++ non VS IDEs, etc. Apps. Pass by reference arguments works better or pass by...
  17. Replies
    2
    Views
    991

    exporting Library functions to some Apps

    In VS MFC DLL, for exporting functions with arguments returning values, etc., which is the most compatible in general?, Includes exporting to some other C/C++ Apps using different IDEs, .Net, etc.?....
  18. sendMessage from MFC DLL to calling MFC application

    hi,
    need an example code or project on sending message (sendmessage) from a MFC DLL to its calling MFC application?.
  19. Thread: toolset selection

    by @EE@
    Replies
    0
    Views
    977

    toolset selection

    hi,
    Is it possible in visual studio select platform toolset using #ifdef?.
  20. Replies
    4
    Views
    874

    Re: structure with function pointers

    my typo error, meant Visual studio 2012.
    I am not why it fails with VS2012?. how to set the VS2012 to C++20?. Project-?Properties?.
  21. Replies
    4
    Views
    874

    structure with function pointers

    Hi,
    compiled the following code with visual studio 2102 and got an error in the red line.


    #include "stdafx.h"
    #include <iostream>


    struct MyStruct {
    int (*foo)();
  22. Thread: 2015 project sln

    by @EE@
    Replies
    5
    Views
    1,166

    Re: 2017 project sln

    opened the sln file with a text editor. Unfortunately do not have the exact text with me. There was a 2012 format info in the 1st and 2nd lines , the third line seemingly was license info. deleted...
  23. Thread: 2015 project sln

    by @EE@
    Replies
    5
    Views
    1,166

    Re: 2017 project sln

    no reply is applicable?.
  24. Replies
    3
    Views
    1,449

    c/c++ ide for win/linux GUI programming

    Hi,
    I like to get some ideas on free win/linux ide tool so that I can utilize my c c++ skils to generate GUIs with it , link the GUI app to c/c++ libraries, etc. most popular out there. easy to use...
  25. Thread: 2015 project sln

    by @EE@
    Replies
    5
    Views
    1,166

    2017 project sln

    I have two 2012 and 2017 visual studios on my PC. On .sln that is created by 2017 , when I movie the mouse over it, it shows 2012.why?.
Results 1 to 25 of 28
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured