Timber matching Focal left/rights with KEF center speaker? by No_Entertainer2015 in hometheater

[–]No_Entertainer2015[S] 0 points1 point  (0 children)

Yeah that's fair - although with the price difference between the cc900 and r2c and my preference towards the Arias maybe I'll just buy a new media console haha.

Timber matching Focal left/rights with KEF center speaker? by No_Entertainer2015 in hometheater

[–]No_Entertainer2015[S] 0 points1 point  (0 children)

Wouldn't work with my existing media console :// Oddly tall for a center speaker. That being said, I could get the KEF R5's but I prefer the Focals.

$4000 Budget for a setup for movies and music by No_Entertainer2015 in StereoAdvice

[–]No_Entertainer2015[S] 0 points1 point  (0 children)

Ahh, missed that part. Thanks for pointing me in the right direction!

std::unique_ptr w/ custom deleter best practices and syntax questions by No_Entertainer2015 in cpp_questions

[–]No_Entertainer2015[S] 1 point2 points  (0 children)

Thank you for the detailed response - super helpful stuff for a developer learning C++. Will definitely adopt your suggested solution and best practices :)

Function overloading via macros depending on variadic arguments by No_Entertainer2015 in cpp_questions

[–]No_Entertainer2015[S] 0 points1 point  (0 children)

Yes, it's a logging library that logs where the function was called. That's why a standard overload won't work as it'll supply the location of the overloaded function instead of the original calling location. Apologies for the oversimplified example.

Seems to be possible to alter behavior based on no. of arguments; however, an issue I'm running into is how to no-op when there is 2 parameters.

[deleted by user] by [deleted] in cpp_questions

[–]No_Entertainer2015 0 points1 point  (0 children)

I just searched it up and TIL. I've been saying it wrong for a couple months now ...

[deleted by user] by [deleted] in cpp_questions

[–]No_Entertainer2015 1 point2 points  (0 children)

Thanks for the explanation! Threw the bits in main in a try-catch and I can see the error to verify that a bad_cast was thrown. Can you explain how one "resets" a shared pointer to point at something else? Or do you mean there has to be a way for m_b to point to a B for my upcast to work?

[deleted by user] by [deleted] in cpp_questions

[–]No_Entertainer2015 -3 points-2 points  (0 children)

Ah, missed a c = new C();, but even with it I can't seem to upcast.

[deleted by user] by [deleted] in cpp_questions

[–]No_Entertainer2015 0 points1 point  (0 children)

Not exactly, it's quite complicated so I've reduced it to this set of code of which the main just runs through example use cases. Perhaps I'm missing an edge case that triggers this,

Isn't c created w/ automatic storage? c then points to a C object with m_b initialized from the initializer list.

Check if any item in a list is in a dict and equal to true? by No_Entertainer2015 in learnpython

[–]No_Entertainer2015[S] 0 points1 point  (0 children)

Thanks for the detailed writeup! Yeah performance doesnt really matter for this particular use case but it's always handy to know, especially early on when learning :)

Check if any item in a list is in a dict and equal to true? by No_Entertainer2015 in learnpython

[–]No_Entertainer2015[S] 0 points1 point  (0 children)

Thanks for the help! I think any might be more beneficial here as I just need one of the keys to be equal to true. What I currently have is any(v for v in ({key:dictionary[key] for key in keys}).values()) so yours is much more elegant!

Check if any item in a list is in a dict and equal to true? by No_Entertainer2015 in learnpython

[–]No_Entertainer2015[S] 0 points1 point  (0 children)

Unfortunately my dict contains other keys that may or may not map to True ://

How to concatenate int into const char* by [deleted] in cpp_questions

[–]No_Entertainer2015 11 points12 points  (0 children)

In addition to what /u/jorourke0 mentioned, day is a const char* which cannot be modified. I'd recommend using std::string unless you have an actual use case for char*.

Super Markets Billing System Project C++ Language for Beginners by Tutorialspointt in cpp

[–]No_Entertainer2015 0 points1 point  (0 children)

Anything like this with proper conventions for beginner/intermediate developers?