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

Search:

Type: Posts; User: TubularX

Page 1 of 10 1 2 3 4

Search: Search took 0.37 seconds.

  1. Re: What should one learn in C++ to develop programs like yahoo messenger ?

    I think you should consider C++ if you need performance, or for a traffic intense website. As a compiled language it will run faster than interpreted ones.

    I recommend a toolkit called Wt:
    ...
  2. Re: What are some books and tutorials that focus on larger scale OO refactoring and d

    That's not fair, I never said that or tried to imply that. Then you misunderstood. I say value semantics is a good alternative that should often be preferred.
  3. Re: What are some books and tutorials that focus on larger scale OO refactoring and d

    I do think it's relevant to mention that when refactoring object oriented code in C++, it may be a good idea to move away from inheritance based design.

    Bjarne Stroustrup gave an interesting talk...
  4. Re: What are some books and tutorials that focus on larger scale OO refactoring and d

    Right, I guess it depends on what's meant by strict. Indeed, more and more functional programming ideas have been included in mainstream OOP languages.



    No, that's not what I'm arguing.

    In...
  5. Re: how to start a MFC.exe using a windows service Application?

    You can send the command as second parameter.

    See example:

    https://docs.microsoft.com/en-us/windows/desktop/ProcThread/creating-processes

    If still not working, call GetLastError() and let us...
  6. Re: What are some books and tutorials that focus on larger scale OO refactoring and d

    Thank you 2kaud for sharing your thoughts. Considering the title of the book, I think it's fair to expect that the reader knows C++.

    OK, so I've just got hold of a copy and read a few random...
  7. Re: What are some books and tutorials that focus on larger scale OO refactoring and d

    I haven't read it. Do you recommend buying it? I wasn't convinced by the reviews.

    Here is a video presentation that I find helpful:
    ...
  8. Re: What are some books and tutorials that focus on larger scale OO refactoring and d

    You should use a member function if it maintains the invariant of the class (the meaning of invariant is explained in the interview referred to by laserlight). Otherwise prefer non-member functions....
  9. Re: What are some books and tutorials that focus on larger scale OO refactoring and d

    Regarding refactoring large systems, I would recommend:
    - Working Effectively with Legacy Code
    - The Mikado Method

    Regarding design, in C++ you don't have to use a strict object-oriented design,...
  10. Re: should the class constructor be defined before or after public member declaration

    I'm sorry, I did not know. Did I miss something? There is no mention of C++98. I was just trying to give some helpful advice.
  11. Re: should the class constructor be defined before or after public member declaration

    The C++ Core Guidelines recommends (and enforces) the following order:

    constructors, assignments, destructor
    functions
    data

    That's good for readability and consistency, but doesn't make any...
  12. Replies
    18
    Views
    1,993

    Re: Two dimensional dynamic string array

    That sounds like "one way communication" as I mentioned in my previous post. The side effect of printing is probably only important to the user and doesn't affect the rest of the code (assuming that...
  13. Replies
    18
    Views
    1,993

    Re: Two dimensional dynamic string array

    Well, the advice from your link says:

    "If a dependency is ambient, meaning that it is used by many classes and/or multiple layers, use Singleton."

    I just don't think it's that simple. That may...
  14. Replies
    18
    Views
    1,993

    Re: Two dimensional dynamic string array

    There are advantages, for example regarding unit testing.

    Coupling with a specific class can be avoided. For example, you can use a template. Or use a function as parameter (a lambda function...
  15. Replies
    18
    Views
    1,993

    Re: Two dimensional dynamic string array

    Don't do that unless you have very good reasons. It may seem convenient to be able to access your data from any function, but it has many drawbacks. It will make your code harder to understand and...
  16. Replies
    4
    Views
    589

    Re: String compare error

    You're using a C array of chars. C arrays don't have any members.

    Did you mean to use std::string? It has a compare member function.

    Anyway, you don't need to call compare for such a simple...
  17. Replies
    13
    Views
    1,509

    Re: Convert console into SDI

    You're welcome.

    Like 2kaud said, it would be a good idea to upgrade your compiler.

    As a side note, you should be able to make your code more efficient by replacing:



    Mat2Copy =...
  18. Replies
    13
    Views
    1,509

    Re: Convert console into SDI

    OK, I see a problem here. You're creating a copy of each blob, and then you modify the copy. The blob inside the vector is not updated.



    CBlob iteratorBlob = *it;...
  19. Replies
    13
    Views
    1,509

    Re: Convert console into SDI

    My guess would be that you need to clear the m_blobs vector after every frame, otherwise all blobs will be drawn for every frame (see the call to drawBlobInfoOnImage). This is based on the assumption...
  20. Replies
    5
    Views
    1,398

    Re: edit box problem

    Windows is a message-oriented operating system, so you don't need a separate thread for doing that. Whenever a button is pressed, a message will be sent that you can handle. Preferably with message...
  21. Replies
    13
    Views
    1,509

    Re: Convert console into SDI

    Hi, can you explain where the view is updated in your MFC code? I don't see any call to the view, or any call like imshow that was used in your first example.

    And why do you need this line?

    ...
  22. Replies
    31
    Views
    2,096

    Re: using namespace std

    Adding "using namespace" to a scope means that names/symbols in the specified namespace will be available for lookup in that scope.

    If you do that at global scope in a header file, it means that...
  23. Replies
    6
    Views
    920

    Re: How use an Abstract class?

    The base class should be abstract, not the derived class. It should look something like this:



    class base
    {
    public:
    virtual ~base() = default;

    virtual void Move() = 0;
  24. Replies
    7
    Views
    778

    Re: mask copy constructor

    Right, the copied object will have a pointer that points to the same memory.

    If you really want to make a copy, you would either need to make a deep copy (i.e. make sure the memory pointed to is...
  25. Replies
    7
    Views
    778

    Re: mask copy constructor

    This is OK. Declaring the copy constructor private without defining it, is an old trick to prevent copies. (in modern C++, "= delete" can be used instead).

    The Anfiteatro class has a pointer...
Results 1 to 25 of 235
Page 1 of 10 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)