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

Search:

Type: Posts; User: 2kaud

Page 1 of 80 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    1
    Views
    65

    Re: Deciding which language to pursue ...

    'Overall PC security app' is pretty vague and could cover many things.

    Can you be a bit more specific as to what you are wanting to achieve?

    If you know VB6, then you might be interested in...
  2. Replies
    6
    Views
    363

    Re: programming question

    [ moved ]
  3. Thread: move jpg files

    by 2kaud
    Replies
    24
    Views
    492

    Re: move jpg files

    So what's wrong with the responses you're received on VBforums? They have way more members who could help with VB than on this forum...
  4. Thread: move jpg files

    by 2kaud
    Replies
    24
    Views
    492

    Re: move jpg files

    For VB, the codeguru sister site VBforums as you found out when you also posted the question there and received replies that did indeed include code...
  5. Thread: move jpg files

    by 2kaud
    Replies
    24
    Views
    492

    Re: move jpg files

    [Now asked on VB sister site https://www.vbforums.com/showthread.php?897187-find-jpg-files ]
  6. Thread: stl find

    by 2kaud
    Replies
    12
    Views
    517

    Re: stl find

    std::bit_width() requires an unsigned type for argument.

    "This overload participates in overload resolution only if T is an unsigned integer type (that is, unsigned char, unsigned short, unsigned...
  7. Thread: stl find

    by 2kaud
    Replies
    12
    Views
    517

    Re: stl find

    Then just do it as a simple lookup-table. You don't need A - just B with 64 elements.

    x5, x5, x5, x5, x5, x5, x5, x4, x4, x4, x4, x4, x4, x4 ,x4.....

    etc. Then just check that index is within...
  8. Thread: stl find

    by 2kaud
    Replies
    12
    Views
    517

    Re: stl find

    What are the sizes of A and B?

    If they are just values from 1 to 64 even in production, then a simple table lookup using an array of size 64 with each element the required x value. If the given...
  9. Thread: stl find

    by 2kaud
    Replies
    12
    Views
    517

    Re: stl find

    Is something like this what you are after? I'm not sure what type x1 - x5 are so I've just made them literals.



    #include <iostream>
    #include <vector>
    #include <iterator>

    int main() {...
  10. Thread: stl find

    by 2kaud
    Replies
    12
    Views
    517

    Re: stl find

    Sorry, but I'm not understanding. Perhaps you could provide an example of A and B and what is expected from the function.
  11. Replies
    3
    Views
    390

    Re: Built in Data Types Support in C and C++

    For the C++ in-built intrinsic types see:
    https://en.cppreference.com/w/cpp/language/types

    Which language(s) may be suitable for which projects can depend upon the project and existing...
  12. Replies
    16
    Views
    3,718

    Re: SHCreateDirectory not found

    Well excluding "format.h", those headers compile fine for me with VS2022.

    But without seeing the code that gives the compiler errors...

    This test code compiles OK with the given header:


    ...
  13. Thread: C++23

    by 2kaud
    Replies
    0
    Views
    551

    Sticky: C++23

    For a summary article re the new features in C++23 see:
    https://github.com/steve-downey/papers/blob/master/wg21-status.org
  14. Replies
    1
    Views
    255

    Re: Which is better method to start learn C++?

    The best on-line free resource to learn C++ is https://www.learncpp.com/

    For a book, IMO the best to learn from is Ivor Horton's Beginning C++: From Novice To Professional...
  15. Replies
    10
    Views
    898

    Re: help with hobby programming in C++

    Sorry my bad - I blame not enough coffee! When I was going through the original code I misread one line and used 8 instead of v.size() - 1.

    I've also changed in main re detecting no move possible...
  16. Replies
    10
    Views
    898

    Re: help with hobby programming in C++

    As an example of using std::unordered_set consider:



    #include <iostream>
    #include <unordered_set>

    struct Pos {
    int i {};
    int j {};
  17. Replies
    10
    Views
    898

    Re: help with hobby programming in C++

    You need to maintain a container of already visited locations. I'd suggest a std::unordered_set

    https://cplusplus.com/reference/unordered_set/unordered_set/

    insert only works if the value to be...
  18. Replies
    10
    Views
    898

    Re: help with hobby programming in C++

    Then you need to use the debugger to trace through the code to see where is the issue.

    When I ran the code, I was getting -ve values for moved to in disp().



    Moved to (11,1)

    Total moves :...
  19. Replies
    10
    Views
    898

    Re: help with hobby programming in C++

    There are various issues with variables being defined at global or function level and then at local scope level.

    As a start, this revised c++ code compiles cleanly. If it now doesn't work as...
  20. Re: Implicit type conversion and time measurement.

    The original question was



    When signed/unsigned operations are mixed, the signed will always be 'promoted' to unsigned. Then the operation is performed. This automatic promotion is often...
  21. Re: Implicit type conversion and time measurement.

    [also asked here https://cplusplus.com/forum/windows/283922/ ]
  22. Thread: Functor

    by 2kaud
    Replies
    17
    Views
    1,132

    Re: Functor

    Just trying to help... Some aspects of C++ can be confusing/bewildering (add your own adjective!).
  23. Replies
    15
    Views
    2,014

    Re: needs to convert C++ code to JAVA

    ... but that would require the OP to actually do some work as opposed to being spoon-fed!
  24. Thread: Functor

    by 2kaud
    Replies
    17
    Views
    1,132

    Re: Functor

    Several of the std::algorithm functions work in the same way. eg sort()
  25. Replies
    2
    Views
    281

    Re: Running an application on multiple CPUs

    It depends upon how the program has been coded. If it is coded as a multi-threaded program, then the number of threads used is dependent upon how the program uses threads. It might be coded to just...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4





Click Here to Expand Forum to Full Width

Featured