« first day (2512 days earlier)      last day (45 days later) » 

12:16 AM
ML Classification 9.749563126091899E-4 (Old classification 0.4)
Allowing a variable (or, in this case, a class member) to be initialised using itself has its uses, and detecting cases where it doesn't make sense is either difficult for a compiler to implement or opinion-based (there are plenty of cases where some programmers insist it's a good idea, and other programmers adamantly deny that). In terms of the standard, this particular case falls into the category of "undefined behaviour, no diagnostic required" but other cases aren't like that. — Peter 58 secs ago
 
 
1 hour later…
1:31 AM
2021-12-06T01:31:14.755997Z Quota has been reset. Was 8265 is now 9999
 
1:49 AM
ML Classification 0.008147477195359371 (Old classification 0.4)
@lesserfish There are plenty - and, as I said, the merits or otherwise of them are matters of opinion and debate. But consider a function SomeType initialise_and_register(SomeType &x) which stores the address of its argument somewhere for later usage, and returns a value. One possible usage of that would be SomeType foo = initialise_and_register(foo);. Even getting away from a debate about functions that store pointers to their arguments in global storage, a certain percentage of programmers would prefer that usage over (say) SomeType foo; foo = initialise_and_register(foo);Peter 54 secs ago
 
2:00 AM
Edits fetched for 270693: 3. quota remaining 9965
Edits fetched for 270693: 3. quota remaining 9958
 
 
6 hours later…
 
1 hour later…
9:43 AM
ML Classification 0.19539798794029886 (Old classification 0.0)
Please read the Open letter to students with homework problems and How do I ask and answer homework questions?. Just copy/pasting your assignments will not win you any friends. — Quentin 23 secs ago
 
 
1 hour later…
10:52 AM
ML Classification 0.7664337559981437 (Old classification 0.0)
 
 
3 hours later…
1:24 PM
ML Classification 0.845147400594995 (Old classification 0.0)
ML Classification 0.0033297568858808406 (Old classification 0.0)
You are "forced to create another function" either way. You are either creating a function that overrides the existing one, or creating a function that wraps the existing one. In both cases, you've written one function, it's just a matter of where you place it. Anyway, inheritance sucks and you should not actively be looking for opportunities to use it. — Michael 25 secs ago
 
 
4 hours later…
5:22 PM
ML Classification 0.005703910146651312 (Old classification 0.4)
When you cast things like that, all bets are off. Casts are the programmers way to say to the compiler "I know more than you do". If you're wrong, then there's nothing the compiler can do. — Michael 25 secs ago
 
5:45 PM
Edits fetched for 162546: 13. quota remaining 8830
ML Classification 0.02809587190946357 (Old classification 0.43)
i agree, but it might be useful for programmers with less experience, like myself, who don't know that the documentation exists or are overwhelmed by the information in it — Mr. ATC 45 secs ago
 
 
3 hours later…
8:57 PM
ML Classification 0.04474623506478439 (Old classification 0.0)
Questions that ask for general guidance regarding a problem approach are typically too broad and are not a good fit for this site. People have their own method for approaching the problem and because of this there cannot be a correct answer. Give a good read over Where to Startitprorh66 22 secs ago
 
9:11 PM
ML Classification 0.9238229230040482 (Old classification 1.0)
This isn't really a practical problem suited to Stack Overflow. You just want to write better code. This might be better suited to Software Engineering or Code Review but you should read their help docs and tutorials to understand if it's on topic there or not. — mason 26 secs ago
 
 
1 hour later…
10:19 PM
ML Classification 0.0031889299994549833 (Old classification 0.4)
Also, it seems that too many new C++ programmers take on this "binary file" reading/writing stuff, for no reason that I see. There must be hundreds, if not thousands of questions with the same issue, and almost all of them posted by new C++ programmers. So I wonder where the new programmers are getting this bad information, or being led into writing code like this. — PaulMcKenzie 9 secs ago
 
10:48 PM
ML Classification 0.007429364348550328 (Old classification 0.4)
Is there a good reason why myMaps is a pointer? I can't think of any. This looks like something that Java programmers do when they start writing C++. — paddy 16 secs ago
 
11:22 PM
ML Classification 0.0012466699657595521 (Old classification 0.4)
Richly annotated, but for what audience? Not for other programmers, because for that purpose we have comments #. Not for automatic documentation generators, because for that purpose we have docstrings and the standard pydoc module. What properties of the available tools do you find inadequate? — Paul Cornelius 55 secs ago
 

« first day (2512 days earlier)      last day (45 days later) »