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

Search:

Type: Posts; User: wolle

Page 1 of 16 1 2 3 4

Search: Search took 0.02 seconds; generated 44 minute(s) ago.

  1. Re: what is the difference b multitasking and multithreading ?

    Well, multithreading is an abstract concept. It hides the dependency on the number of processors by only requiring that threads appear to be running simultaneously. Whether and when they actually run...
  2. Re: what is the difference b multitasking and multithreading ?

    The multitasking explanation is also lacking. In cooperative multitasking there's not necessarily "a frequent switching between tasks". It could be so but that's up to the tasks. So multitasking can...
  3. Re: what is the difference b multitasking and multithreading ?

    Here's a site called TechDifferences. It's basically answers to lots of what's-the-difference-between-X-and-Y questions. The info seems solid but strangely it's not clear who's providing the...
  4. Thread: Obfuscation

    by wolle
    Replies
    7
    Views
    157

    Re: Obfuscation

    You mean "spagetti" code right? That's what I had in mind with my somewhat ironic previous reply. Most code is sufficient incomprehensible right from the start so no further obfuscation is necessary....
  5. Thread: Obfuscation

    by wolle
    Replies
    7
    Views
    157

    Re: Obfuscation

    Quite seldom because,

    - most code is not worth stealing anyway, and

    - most code is in no need of further obfuscation.

    :)
  6. Re: error C2660: 'InputComponent::update': function does not take 1 arguments

    A recursive dependency is a sign of a design problem called tight coupling. A common way to loosen it up it is to introduce a new class that breaks the dependency.
  7. Re: error C2660: 'InputComponent::update': function does not take 1 arguments

    In InputComponent.h you do #include "Player.h".

    And in Player.h you do #include "InputComponent.h".

    That is you are including .h files recursively. This usually means trouble and can cause...
  8. Re: pass by value and pass by reference in Java?

    The parameter passing mechanism in Java is always by_value. The by_reference passing mechanism doesn't exist in Java. It means whatever you pass (a primitive or a reference) to a method it will be...
  9. Re: Returning a reference to (--the contents of--) a local variable

    Just a comment.

    If ProcessThread is a class and the get_noinplace_buffers method is public then there's a break of encapsulation because the internal implementation is exposed. This is considered...
  10. Re: Exporting Classes The Right Way, Tricks and Tips?

    If you plan to distribute your library as a pure header library then there are three basic rules to follow:

    1. Each file must have an include guard.
    2. Free functions must be declared inline.
    3....
  11. Re: Exporting Classes The Right Way, Tricks and Tips?

    Yes why not?

    I'd say it's a trend today to distribute libraries by making the library source code available as a set of include files. The users aren't even required to build a compiled version of...
  12. Re: Instantiating objects from user independent code.

    Yes that's the idea. But note that it requires some quite advanced programming on your part. You graduate from application programmer to systems programmer. It also requires the users of your...
  13. Re: Instantiating objects from user independent code.

    What you're asking is usually called "dynamic loading". Here's a link to an implementation both for Windows and Linux,

    https://theopnv.com/dynamic-loading/

    A totally different approach (to...
  14. Re: X,Y line offset algorithm without self intersection

    You're welcome.

    I based my reply in #8 on the pdf-file you posted but after having had a look at the actual code I don't think it quite correctly describes what the code does.

    Instead it's more...
  15. Thread: Destructor

    by wolle
    Replies
    4
    Views
    350

    Re: Destructor

    There's a third option. As of C++ 11 a so called (reference counting) smart pointer became part of the standard. It's called std::shared_ptr.

    This smart pointer is used like an ordinary pointer...
  16. Re: X,Y line offset algorithm without self intersection

    Hi again, sorry for the delay.

    Yes I can read that pdf-file fine. I think I understand the problem now but I don't understand why you need the two innermost while loops in your code?

    Let's...
  17. Re: X,Y line offset algorithm without self intersection

    I suppose X is an array holding the input x,y-coordinates but it seems X is one-dimensional. Does it mean one of the coordinates, say x, is implicit in the array index while the other one, say y, is...
  18. Re: X,Y line offset algorithm without self intersection

    Code is often the ultimate explanation of an algorithm but only if it works. Yours doesn't so you will have to explain the algorithm in some other way. Only then can one tell what's wrong with the...
  19. Replies
    3
    Views
    370

    Re: A confusing struct (used with std::set)

    You're welcome. If you don't mind here are a few comments on the code.

    Firstly, an std::set is used. This means the smart pointers will be held in sorted order but if the application doesn't rely...
  20. Replies
    3
    Views
    370

    Re: A confusing struct (used with std::set)

    The c pointer is turned into a boost::shared_pointer because the find() method expects a boost::shared_pointer as parameter. After the call to find() the boost::shared_pointer would normally delete c...
  21. Re: Why changing the order of struct members can change the size of it?

    Well, you need to pack data according to how the Graphics subsystem expects to find it. It means you need to know enough about the programming language and the tools you're using to accomplish the...
  22. Re: std::vector suddenly throw read access violation(Corrupted)

    Well, no pain - no gain, as the saying goes. It means you are now a much better programmer! :)
  23. Re: std::vector suddenly throw read access violation(Corrupted)

    What if you initialize this structure to zero,

    VkCommandBufferBeginInfo commandBufferBeginInfo;
  24. Replies
    5
    Views
    375

    Re: Making a class non-copyable

    I've thought about having my own noncopyable for quite some time and finally got around to it (by following Arjay's advice above). I seldom need it but once in a while I do and then I always miss the...
  25. Re: Calculating Grades program (Passing grades) (Failing Grades) in C++

    To get started there are C++ tutorials on the internet, like here

    http://www.ntu.edu.sg/home/ehchua/programming/cpp/cp0_introduction.html
Results 1 to 25 of 392
Page 1 of 16 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)