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

Search:

Type: Posts; User: wolle

Page 1 of 26 1 2 3 4

Search: Search took 1.83 seconds.

  1. Re: coming up with data structure for the algorithm

    You don't have to sort anything. Of course you can store all distances and then sort them to find the shortest. But you really just need to keep track of one distance, the shortest_so_far. Each time...
  2. Re: coming up with data structure for the algorithm

    Do you want to find the shortest cell distance between two sites? Then you just calculate all possible cell distances one by one and keep the shortest so far. You don't need a data structure for that.
  3. Thread: JAVA errors

    by wolle
    Replies
    3
    Views
    161

    Re: JAVA errors

    Start with a minimal program that works. In this case just a main method that prints "Hello world". Then add code, little by little in incremental steps making sure it works after each step. So you...
  4. Re: I want to learn how monitors and graphics hardware create and display images.

    Why not just take a screenshot,

    https://www.howtogeek.com/226280/how-to-take-screenshots-in-windows-10/
  5. Re: I want to learn how monitors and graphics hardware create and display images.

    Here's a site trying to explain how things work to a general audience,

    https://computer.howstuffworks.com/graphics-card.htm
  6. Re: What does an interface not allowed to have any implementation?

    There are two kinds of inheritance, inheritance of implementation and inheritance of interface. Inheritance of implementation can lead to the so called fragile base class problem,
    ...
  7. Replies
    5
    Views
    400

    Re: Best web dev language 2020

    It looks like your buddy has been right all the time, only it took a little while for the future to arrive :). Maybe Java got in between. It showed up in 1995 and enjoyed an almost religious...
  8. Replies
    5
    Views
    400

    Re: Best web dev language 2020

    To me it seems Python is the new Basic. At least it is very popular (Tiobe Nov. 2020),

    https://www.tiobe.com/tiobe-index/

    But considering your VB6 background maybe VB (.NET) is a better choice,...
  9. Replies
    21
    Views
    1,726

    Re: replace with sort algorithm

    Well, what I can see from the code in #1 you are copying already as part of the sorting process (swapping of records),


    {
    PiInfo tmp = pIIInfo[(size_t)i];
    pIIInfo[(size_t)i] =...
  10. Replies
    21
    Views
    1,726

    Re: replace with sort algorithm

    If the problem is that you want to co-sort the second array with the first, one way is to introduce a temporary std::vector of std:: pair.

    In each std:: pair you combine a PiInfo object with its...
  11. Re: Programm crashes due to the presence of code even if it is not executed

    Just because a section of code cannot be reached due to the program logic doesn't mean it's not present in the executable. It may still influence what else gets included that can cause problems.

    I...
  12. Replies
    3
    Views
    848

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

    Yet another cross-platform GUI is wxWidgets,

    https://www.wxwidgets.org/
  13. Thread: boost::bind

    by wolle
    Replies
    9
    Views
    1,006

    Re: boost::bind

    Maybe it is a question of programming style. Traditionally in procedural programming, if you don't have all parameters immediately available to call a function you gather them by asking around for...
  14. Thread: boost::bind

    by wolle
    Replies
    9
    Views
    1,006

    Re: boost::bind

    I've never got into using bind because you regularly see articles like this,

    https://abseil.io/tips/108

    This article suggest using either lambdas or absl::bind_front instead, the latter...
  15. Replies
    2
    Views
    2,224

    Re: Rust Language Rocket Framework

    The complete text can be found here,

    https://en.wikipedia.org/wiki/Rust_(programming_language)
  16. Re: Force a friend outside of class declaration?

    Well, I'm sure there is some ugly trick to do it but using the preprocessor is better I think because then you don't break the C++ language itself. The preprocessor allows you to select which parts...
  17. Re: Force a friend outside of class declaration?

    You could use the preprocessor to define a macro that looks like this while testing,

    #define UNITTEST_FRIEND int AccessPrivateSruff(const MyClass& obj);

    and otherwise like this,

    #define...
  18. Replies
    5
    Views
    496

    Re: Looking for SSE instruction

    You could replace the loop with 16 straight assignments like,


    target[0] = A[0];
    target[1] = B[0];
    target[2] = C[0];
    target[3] = D[0];
    target[4] = A[1];
    target[5] = B[1];
    ...
  19. Re: Do header files with implementation work in a precompiled header?

    You could write your own interface to the big header-only libraries with the implementation part of the interface on one or a few .cpp files. If you don't change the interface then the .cpp files...
  20. Thread: Search Engine

    by wolle
    Replies
    5
    Views
    1,587

    Re: Search Engine

    I wouldn't say Java is totally different from C++ but there are substantial differences. Java has a much stronger object oriented (OO) feel to it, there's a garbage collector, all objects are...
  21. Thread: Search Engine

    by wolle
    Replies
    5
    Views
    1,587

    Re: Search Engine

    So your main problem is that you lack basic Java programming skills right, and now want someone to do the job for you? :)

    Still my advice stands - keep it simple! Base your database on an...
  22. Thread: Search Engine

    by wolle
    Replies
    5
    Views
    1,587

    Re: Search Engine

    Regarding b (Built-in Binary Search): Note that a binary search works on random access arrays with items in sorted order. It means the ArrayList must be sorted, and the LinkedList will not work at...
  23. Re: Casting references VS Casting the mem address of that reference?

    Assigning a derived type to a base type is typesafe meaning the correctness can be checked at compile-time already. Because of that, explicit upcasting is never necessary (although allowed).

    An...
  24. Replies
    4
    Views
    1,209

    Re: Java NetBeans Related Project

    You could have a version with reverse roles where the user thinks of a number and the computer guesses. When the computer comes up with a number the user enters whether the guess is higher or lower. ...
  25. Replies
    10
    Views
    1,316

    Re: Time calculation in the main game loop.

    Well, not in this particular OP case but I suppose Sys_Milliseconds is originally designed for general use to behave as expected of a system timer (as I describe in #7). Anyway, that's the only...
Results 1 to 25 of 632
Page 1 of 26 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)