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

Search:

Type: Posts; User: wolle

Page 1 of 25 1 2 3 4

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

  1. Replies
    3
    Views
    253

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

    Yet another cross-platform GUI is wxWidgets,

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

    by wolle
    Replies
    9
    Views
    836

    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...
  3. Thread: boost::bind

    by wolle
    Replies
    9
    Views
    836

    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...
  4. Replies
    2
    Views
    2,118

    Re: Rust Language Rocket Framework

    The complete text can be found here,

    https://en.wikipedia.org/wiki/Rust_(programming_language)
  5. 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...
  6. 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...
  7. Replies
    5
    Views
    418

    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];
    ...
  8. 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...
  9. Thread: Search Engine

    by wolle
    Replies
    5
    Views
    1,238

    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...
  10. Thread: Search Engine

    by wolle
    Replies
    5
    Views
    1,238

    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...
  11. Thread: Search Engine

    by wolle
    Replies
    5
    Views
    1,238

    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...
  12. 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...
  13. Replies
    4
    Views
    1,071

    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. ...
  14. Replies
    10
    Views
    1,209

    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...
  15. Replies
    10
    Views
    1,209

    Re: Time calculation in the main game loop.

    Are you sure? I'd say it's the other way around because almost always the arrow of time is represented by increasing clocks. It means newtime will always be equal to or larger than oldtime.

    What...
  16. Replies
    10
    Views
    1,209

    Re: Time calculation in the main game loop.

    I interpret this comment,

    // let base retain 16 bits of effectively random data

    to mean that it's not the randomness of base that is retained, it's the randomness of Sys_Milliseconds that base...
  17. Replies
    10
    Views
    1,209

    Re: Time calculation in the main game loop.

    I wondered that too and found the file where the OP code is from. It's halfway down here,

    https://unix.superglobalmegacorp.com/quake2/newsrc/321/win32/q_shwin.c.html

    The base variable is static...
  18. Replies
    34
    Views
    4,256

    Re: switch case or if else ?

    Are you sure? As I argued in #30, the straight code alternative I suggested may actually be more efficient.

    1. First, say it stands between using the if statement or the switch statement. Since...
  19. Replies
    34
    Views
    4,256

    Re: switch case or if else ?

    You usually prefer a switch statement when you have several cases with roughly equal probability of being selected. With just two cases I would pick the if statement.

    But do you really have two...
  20. Replies
    9
    Views
    1,374

    Re: passing string as default argument (reference)

    You could return an std:: pair (or std::tuple). The function signature would be,


    std::pair<double, std::string> GetEffAzimuth(const MultiTechCell* pCell)


    Return statements would look like...
  21. Replies
    2,363
    Views
    750,749

    Re: The Boring Thread

    Sorry for that, I'll try another topic. Hopefully the one I have in mind will be a better fit. It should because one of its most influential figures goes by the name of Mr. Bohr.

    I'm talking...
  22. Re: Critical section begin end() changing the auto value

    Also note that concurrency is supported by the C++ language itself so explicit calls to the OS can often be avoided.
  23. Replies
    10
    Views
    1,895

    Re: WSL (Windows Subsystem for Linux)

    Yes but WSL 2 is very new and because of that a quite risky proposition.

    If the major reason for considering WSL is familiarity with the Microsoft development tools there's another strategy...
  24. Replies
    10
    Views
    1,895

    Re: WSL (Windows Subsystem for Linux)

    I found this info,

    https://www.theverge.com/2020/5/19/21263377/microsoft-windows-10-linux-gui-apps-gpu-acceleration-wsl-features

    so it seems possible to get a Linux GUI working on Windows with...
  25. Replies
    10
    Views
    1,895

    Re: WSL (Windows Subsystem for Linux)

    I haven't but it's interesting. Is Windows becoming a Linux distribution? According to this info,

    https://docs.microsoft.com/en-us/windows/wsl/compare-versions

    version 2 of WSL has a full Linux...
Results 1 to 25 of 606
Page 1 of 25 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)