General C++ Programming - December 2023

boolean test
 
For bool b, is the test if (b) slightly faster than if (!b)? For example, should I change code if (!b) do_a(); else do_b(); into if (b) do_b(); else...
[8 replies] Last: I don't think we can say in general which is "faster". If there is an... (by mbozzi)
How to get std::priority_queue to update dynamically when element priorities change?
 
Suppose you have a custom type, Foo , whose Num member is used to determine priority in a priority_queue: struct Foo { string Name = ""; int...
[4 replies] Last: what you are talking about is a sorted container that is smart enough ... (by jonnin)
run tasklist in c++
 
Is there a function in C PLUS Plus to know which programs are running on the other user? like this: tasklist /FI "IMAGENAME eq notbad.exe" /FI "USERNAME eq HWL...
[6 replies] Last: thanks all so much , solved (by Hawlong)
Need Help with C++ Basics!
 
Have a look at this site: https://www.learncpp.com/ For a book I suggest Ivor Horton's 'Beginning C++23: From beginner to pro' https://www.amazon.co.uk/Beginn...
[4 replies] Last: Back in the 1980's all of the McDonald's on Oahu had Portuguese Sausag... (by George PlusPlus)
convert autoit code to c++
 
hello all , please how can convert this code to c++ What this code does is when I go to another user in Windows, this program conn.exe runs . #include <WinA...
[2 replies] Last: Thanks for replay jonnin i have 10 users in my pc ,i created a progra... (by Hawlong)
Turn-based Card Game Feature: Out-of-turn Trade Request
 
Just FYI, I haven't written any code for the game. I'm in the planning phase, brainstorming how certain game features might affect the structure/architecture of...
[2 replies] Last: As I see it, you have three choices ( order of difficulty) 1) The si... (by AbstractionAnon)
by PeteDD
Constructor for derived class
 
I am adding some methods to the NTPClient by creating a derived class MyNTP. But now, I can't figure out how to invoke the new class. That is, I can't figur...
[11 replies] Last: Thank you all! @SeePlus, Yes, exactly, thank you! But what you're ... (by PeteDD)
  Archived months: [nov2023] [jan2024]

This is an archived page. To post a new message, go to the current page.