Forum Replies Created

Viewing 14 posts - 331 through 344 (of 344 total)
  • Author
    Posts
  • in reply to: Forward declare enums #9705
    RainerRainer
    Keymaster
        Up
        0
        Down
        ::

        std::boolalpha is sticky. It’s sufficient to use it only once: https://godbolt.org/z/snqGTvbWs

        in reply to: Types (week 3) – Pointer question #9671
        RainerRainer
        Keymaster
            Up
            0
            Down
            ::

            This is an error. I fix this in the slides and record the video once more. Here are the fixed lines:

            int i = 20;

            int* iptr = &i;

             

             

            int* j1 = iptr;

            int j2 = *iptr;

             

            iptr returns the value (pointer)

            *iptr: deferences the pointer (underlying value)

             

             

            in reply to: Self Introductions #9658
            RainerRainer
            Keymaster
                Up
                0
                Down
                ::

                Very good idea. I make your idea to a topic of the next Q&A session, and I prepare something. Originally, I wanted to use WordPress tools for that job, but I failed.

                in reply to: Examples of good souce code? #9617
                RainerRainer
                Keymaster
                    Up
                    0
                    Down
                    ::

                    Should I delete one?

                    in reply to: Time duration #9608
                    RainerRainer
                    Keymaster
                        Up
                        0
                        Down
                        ::

                        You don’t know. It depends on the accuracy of your system clock. The system clock represents the system-wide real time wall clock on your system. Typically, the epoch of the system_clock is the Unix Time (1 January 1970). Since C++20 it must be Unix Time.

                        When you display the time since epoch, define your tick (seconds, minutes, hours, …) and use it.

                        Here is the resolution in hours:

                        const auto p1 = std::chrono::system_clock::now();
                        std::chrono::duration_cast<std::chrono::hours>(p1.time_since_epoch()).count()

                        This post https://www.modernescpp.com/index.php/the-three-clocks provides you more details. Study in particular the example now.cpp.

                        in reply to: My replies to forum posts don’t show up. #9595
                        RainerRainer
                        Keymaster
                            Up
                            0
                            Down
                            ::

                            First, the once more disappeared. The trick was to create and delete a replay immediately.

                            Here is my proof:

                             

                            0

                            Down

                            I often see Facebooks ‘Folly’ recommended https://github.com/facebook/folly ,  boost libraries, and llvm clang, but they’re quite heavy weight.

                            Here is a repo with a bunch of Open Source C++ projects supposedly in modern C++, but I haven’t looked through it much. https://github.com/rigtorp/awesome-modern-cpp

                            Here is a similar discussion with a bunch of suggestions https://news.ycombinator.com/item?id=24901244

                            If you look through large popular libraries you’ll tons of boilerplate code and lots of template metaprogramming. It might be easier to read some higher level code of smaller applications?

                             

                            Tomorrow, I think about an alternative forum tool.

                             

                            in reply to: My replies to forum posts don’t show up. #9589
                            RainerRainer
                            Keymaster
                                Up
                                0
                                Down
                                ::

                                This seems to be a caching issue of the forum tool or the browser.

                                • When I use google chromo, I see you comments. But I don’t see them with Firefox.
                                • When I create with as master as reply and delete it afterwards, Firefox displays your comments.
                                in reply to: My replies to forum posts don’t show up. #9582
                                RainerRainer
                                Keymaster
                                    Up
                                    0
                                    Down
                                    ::

                                    Now, your comments suddenly appeared. I have no idea, why? Here is what I changed:

                                    • I enabled nested replies.
                                    • I changed your displayed name to Jonny.
                                    • I played in the topic that didn’t displayed your replies with the reply button and the reply editor. I assume that flushed the cache.

                                    Honestly, I have no idea what is going on. Also google gave me no hint. I will observe this weird behavior. At least, your comments are not lost.

                                     

                                    in reply to: My replies to forum posts don’t show up. #9572
                                    RainerRainer
                                    Keymaster
                                        Up
                                        0
                                        Down
                                        ::

                                        This is really strange. I can replace as as admin and as a participant (such as you) in both threads.

                                        Due to the statistics, you created two topics and six replies. Only three of your replies are visible.

                                        in reply to: Examples of good souce code? #9564
                                        RainerRainer
                                        Keymaster
                                            Up
                                            0
                                            Down
                                            ::

                                            Boost is a good example of library design: https://www.boost.org/.

                                            in reply to: My replies to forum posts don’t show up. #9562
                                            RainerRainer
                                            Keymaster
                                                Up
                                                0
                                                Down
                                                ::

                                                For me, it works. I try to fix this. Maybe, it’s a rights issue.

                                                in reply to: Quick question regarding isocpp.org #9513
                                                RainerRainer
                                                Keymaster
                                                    Up
                                                    1
                                                    Down
                                                    ::

                                                    This is the home of the standardization committee, and, therefore, highly reputable. It helps you to understand the standardization process, and the direction in which C++ is headed to. When you want to participate in the C++ standardization process, you should visit this page.

                                                    in reply to: Principles of C++ #9168
                                                    RainerRainer
                                                    Keymaster
                                                        Up
                                                        0
                                                        Down
                                                        ::

                                                        Here is the short answer. Late binding (virtuality) is typically implemented with a pointer indirection. You have to pay for this pointer, but sometimes you don’t need it. Therefore, you use in C++ by default, in contrast to Java or Python, early binding.
                                                        Long answer: Wait for our inheritance lessons.

                                                        in reply to: Proper C++ to English Translation #9152
                                                        RainerRainer
                                                        Keymaster
                                                            Up
                                                            1
                                                            Down
                                                            ::

                                                            I don’t know any resource. I try to be as exact and consistent as possible. If I find one, I will add it to further information.

                                                            This topic is extremely important when we talk about “const pointers to const ints”, or discuss template parameters, template arguments, and function arguments.

                                                          Viewing 14 posts - 331 through 344 (of 344 total)