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

Search:

Type: Posts; User: tiliavirga

Page 1 of 10 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    5
    Views
    14,555

    Re: Vulkan released

    So you know nothing about graphics and gaming and didn't bother to check my credentials and simply made an error of judgement.

    Apology accepted.
  2. Replies
    5
    Views
    14,555

    Re: Vulkan released

    You must be kidding. Vulkan is a new open standard of general interest to every graphics programmer.

    Banning it here is like banning the C++ standard from being mentioned in a C++ forum.
  3. Replies
    5
    Views
    14,555

    Vulkan released

    I probably stick with DirectX 12 but it's always interesting with something new,

    https://www.khronos.org/vulkan/
  4. Replies
    7
    Views
    15,638

    Re: C++ Interview Questions

    Well, be aware that lots of information already exists on this topic. Not only are there books but also comparisons of books, like here for example,
    ...
  5. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    Here it is now,



    void test2() {
    int V=3;
    int D=5;
    assert(V>0 && D>=0);

    std::vector<int> r(V,0);
  6. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    Have you noticed my post #11?

    Say we have V=3 (slots) and D= 17 (sum).

    Just use V=3 and D=D-V = 17-3 = 14. Then run Gosper's hack with those values and add 1 to each number in every output...
  7. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    I'll just mention that the Gosper's hack algorithm I've been promoting is a very direct application of "bars and stars". Here the bars and the stars are represented with a bit-pattern (held in a...
  8. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    I think maybe my solution can be slightly modified to fit your requirements.

    In principle my solution finds all solutions to this equation for non-negative integers,

    x1 + x2 + x3 + ... + xn = k...
  9. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    The use of bitsets puts a limitation on my solution indeed. It limits V+D to be no bigger than 62 because larger numbers will overflow the long long int used to represent the bitsets. To overcome...
  10. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    I've adapted my code to your problem now.

    What you call sum I call derivative order (D) and I generate all derivative orders from 0 up to and including D. Since you are interested in D only I had...
  11. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    I kind of anticipated this since you had no zeroes in your initial example.

    One solution is to generate all combinations according to my procedure but then cherry pick combinations with no zeros...
  12. Replies
    18
    Views
    20,921

    Re: How to distribute a value into vector

    It looks like a problem I've had recently namely how to find all partial derivatives of a certain order and dimension. I solved it as a combinatorics partition problem using bitsets for the...
  13. Replies
    3
    Views
    6,946

    Re: Programming for children

    Well if I didn't have to do all this grown-up stuff all the time I certainly would be playing around with robots. :)

    http://www.makeblock.cc/mbot/top-10-educational-robot-kit-for-kids/
  14. Replies
    3
    Views
    6,946

    Re: Programming for children

    This seems to be the latest incarnation of Logo,

    http://www.logointerpreter.com/
  15. Replies
    3
    Views
    14,206

    Re: How to improve my efficiency of debugging?

    It's impossible to know whether you're as bad at debugging as you think. You may also have been assigned a too difficult debugging task too soon in your career. The application may even be a hopeless...
  16. Re: concatenate int value from vector to long long int

    Okay, VS2015 may be wrong then but this only emphasizes my point that in this case the function-with-lambda approach is far more convoluted than the for-loop approach.

    I think it's a good...
  17. Re: concatenate int value from vector to long long int

    Sorry, it's a typo. I should be [Cn]. This means Cn is captured by value. I'll modify my post.



    It's not just "yet another way". There's a huge qualitative difference where in my view the...
  18. Re: concatenate int value from vector to long long int

    VS2015 is right. [] means no capture at all. To get implicit capture you need to specify either [=] for value or [&] for reference.

    Capture by value is generally safer and there's never a reason...
  19. Replies
    14
    Views
    19,252

    Re: RAD Studio difference between i++ and ++i

    Certainly, until someone does the impossible and it suddenly becomes possible.

    Some languages such as Java are fully defined (including what the OP asked about). That's not the road ahead for C++...
  20. Replies
    14
    Views
    19,252

    Re: RAD Studio difference between i++ and ++i

    (I always compile cleanly at the the highest warning level.)

    I think a language change is motivated considering the severity of the class of bugs we are talking about. We shouldn't be at the mercy...
  21. Replies
    14
    Views
    19,252

    Re: RAD Studio difference between i++ and ++i

    Well, undefined behavior is a nasty bug and it beats me why it's allowed to pass in silence. To be warned would mean a lot for programmers and cost very little for compiler writers to implement since...
  22. Replies
    14
    Views
    19,252

    Re: RAD Studio difference between i++ and ++i

    I've always found the notion of "undefined" strange. Even if something is undefined it could be part of the C++ language specification that a compiler must issue a warning in such cases. Since a...
  23. Re: Fast way to Multiply two string numeric value

    The usual way is to convert the strings to a C++ fundamental type and then perform calculations on that type.

    For example if you use long long int you can handle integers in the...
  24. Re: topcoder - hard and interesting problem (only for experts)

    You are cheating yourself. Copycatting makes you a scribe not a master programmer.
  25. Re: C++ Console Even/Odd Control Without %,/,+ and -

    Then I'd say there are two time-tested principles that apply in this case: Separation of Concern (SoC) and Keep it Simple Stupid (KISS).

    SoC suggests we first check whether the input string is a...
Results 1 to 25 of 249
Page 1 of 10 1 2 3 4





Click Here to Expand Forum to Full Width

Featured