Beginners - December 2024

How to compare int class template value?
 
I'm aware I should use std::string but this is question is about using template specialization a specific way. I'm learning about template specialization and ...
[2 replies] Last: 2. That's a good point. Only up to MAX_CSTR_SIZE-1 bytes will be copie... (by ElusiveTau)
Template errors creating a map<int,std::thread> using map::emplace
 
I created a class to try out std::lock_guard. The first function, UnsafeExample compiles and runs fine. The second example, SafeExample does not compile a...
[2 replies] Last: Thanks Peter. That was it. 1. std::ref(coutMutex) was necessary, for ... (by ElusiveTau)
How to initialize base class member with subclass member?
 
I'm working with code where CustomThreadApi is not modifiable. CustomThreadApi has a ctor that takes a const char* . I would like to assign MyThreadClass.Nam...
[2 replies] Last: baseClassBuff is unnecessary. I can just reuse MyThreadClass.Name .... (by ElusiveTau)
Removing double quotes from Cstring
 
Hi, sorry its late... I am trying to do a few things with strings. - I need to remove double quotes from a users input - Then the string needs to be divide i...
[8 replies] Last: You only get double quotes if some component of the filename path has ... (by Duthomhas)
Are these ternary operators the same?
 
Hello, What are the differences between these? #include <iostream> int main() { int a = 18, b = 44, total = 0, total2 = 0; total +=...
[8 replies] Last: I think some chips have a way to test a single bit but in general, I d... (by jonnin)
  Archived months: [nov2024]

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