Skip to content
  • 0 Votes
    5 Posts
    0 Views
    Greg UtasG
    Not only that, the introductory post would have to caution against C/C++/Rust/Zig flame wars. :laugh: Robust Services Core | Software Techniques for Lemmings | Articles The fox knows many things, but the hedgehog knows one big thing.
  • Okay. I'm done today

    The Lounge design hardware help c++ css
    7
    0 Votes
    7 Posts
    0 Views
    C
    Please explain why RUST would have solved this problem. Honest and curious question. stack issues are common in embedded systems, no matter what development language you choose. Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
  • Brainless Ad People

    The Lounge c++ com oop help question
    28
    0 Votes
    28 Posts
    0 Views
    D
    haughtonomous wrote: The only useful thing about Marketing is it keeps useless people off the streets. I'd rather they left them on the streets to starve to death. Any concomitant increase in crime can (and should) be dealt with by bringing back the hanging judges. Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
  • 0 Votes
    3 Posts
    0 Views
    O
    Since about 70% of all technical vulnerabilities involve misusing dynamic memory this makes sense.
  • 0 Votes
    5 Posts
    0 Views
    H
    More of consequence to me than anything. :) Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • 0 Votes
    5 Posts
    6 Views
    K
    Googling for something like "C++ derived class tutorial" should give you some useful hits. "A little song, a little dance, a little seltzer down your pants" Chuckles the clown
  • Like Us Or Else!

    The Lounge c++ com collaboration oop question
    24
    0 Votes
    24 Posts
    0 Views
    J
    You can think whatever the hell you want, Richard. I'm not wasting time with you. Jeremy Falcon
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Embedded and legacy rabbit holes

    The Lounge design hardware c++ python com
    5
    0 Votes
    5 Posts
    0 Views
    H
    It wouldn't work that way because you still have to read the text left to right, top to bottom. There's probably some reason for it, but I don't know. Curiously, it's the same format as the SSD1306 monochrome OLED display's framebuffer. Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • Inheritance and STL containers

    C / C++ / MFC question c++ graphics docker oop
    4
    0 Votes
    4 Posts
    10 Views
    M
    Let me expand a bit on my previous answer[^]. As I said, you can convert a pointer (or reference) to pointer (or reference) to the base class. This called "upcasting" because you are moving "up" in the inheritance tree. The conversion is "non-destructive", in other words you can later on "downcast" (move from base to derived) as long as you know what type of object was in the first place. An example: struct Unit { Unit (int tag) : dog_tag(tag){}; virtual std::string kind () = 0; int dog_tag; }; struct Soldier : public Unit { Soldier (int tag) : Unit(tag) {}; virtual std::string kind() {return "soldier";}; float running_speed; } struct Sailor : public Unit { Sailor (int tag) : Unit(tag) {}; virtual std::string kind() {return "sailor";} int life_jackets; }; std::vector actors {new Soldier(555), new Sailor(666);}; int main () { Unit* u0 = actors[0]; std::cout << "Actor 0 is a " << u0.kind() " with tag " << u0.dog_tag << std::endl; If you would look with a debugger at u0 you would see a memory layout something like this: u0 0x1234 -------> pointer to vtable of Soldier dog_tag ----------------------------- running_speed ------------------------------ You can see now why the code works: no matter what kind of object you deal with, the first part of the memory layout is the same. Compiler simply ignores whatever is after the dog_tag field. A few more lines of code (please ignore that I didn't initialize other fields): Soldier *s = (Soldier *)u0; std::cout << "Running speed " << s->running_speed << std::endl; s has exactly the same value as u0 but compiler considers it a pointer to a Soldier object so it uses the value from the running_speed field. I could have written: Sailor *ss = (Sailor*)u0; std::cout << "Sailor has " << ss->life_jackets << " life jackets"; And compiler wouldn't have cared at all. It would have accessed the memory at lif
  • 0 Votes
    4 Posts
    9 Views
    L
    Please stop deleting your questions, as it makes the replies impossible to understand. You have been here long enough, in all your different names, to know how this site works.
  • iCPP

    The Insider News c++ com tools
    2
    0 Votes
    2 Posts
    0 Views
    N
    Kent Sharkey wrote: Well, I suppose a few have asked for something like this (or it wouldn't have been made) Did someone ask to get "smart" gadgets like the "SPoSotW" (smart piece of sh1t of the week) that OG posted a while ago? M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
  • 0 Votes
    9 Posts
    0 Views
    H
    I'm glad you posted it. Even though the Picos aren't my cup of tea I like to keep abreast of the goings on of the field, and I rely in part on Code Project for that (not heavily, as there isn't a lot of embedded here, but I do check daily) Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • Inheritance and arrays

    C / C++ / MFC c++ docker data-structures oop help
    8
    0 Votes
    8 Posts
    13 Views
    L
    Thank you for your comment.
  • English help, please: Aster

    The Lounge question c++ help discussion
    12
    0 Votes
    12 Posts
    0 Views
    C
    obligatory: Gallagher Explains Pronunciation | The New Smothers Brothers Comedy Hour - YouTube[^] Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
  • No sidebar on forums

    Site Bugs / Suggestions c++ help question career
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Notes in MFC/Win32 App

    C / C++ / MFC c++ tutorial
    3
    0 Votes
    3 Posts
    13 Views
    M
    Anywhere means nothing. What do you want to do, exactly ? What is or what kind of data in your window ? How is it represented ? What kind of notes you want to add ? What relation has the note and the data ? Do you have an example of something similar you want to do ? Without more details... I'd handle a click or double click event, open a modal popup window with a text box, and on the OK button, save the note whereever you want to save the note. CI/CD = Continuous Impediment/Continuous Despair
  • 0 Votes
    2 Posts
    0 Views
    N
    Kent Sharkey wrote: If you wrote it (and you remember it), or if someone else wrote it (or you did but you don't remember it)? FTFY :-D M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
  • 0 Votes
    3 Posts
    0 Views
    E
    Flagged as primarily opinion-based.. ;P