Click here to Skip to main content
15,559,819 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Whose idea was this in C\? Pin
raddevus16-Mar-22 5:01
mvaraddevus16-Mar-22 5:01 
GeneralRe: Whose idea was this in C\? Pin
OriginalGriff16-Mar-22 6:00
mveOriginalGriff16-Mar-22 6:00 
GeneralRe: Whose idea was this in C\? Pin
obermd16-Mar-22 6:06
obermd16-Mar-22 6:06 
GeneralRe: Whose idea was this in C\? Pin
Greg Utas16-Mar-22 6:25
mveGreg Utas16-Mar-22 6:25 
JokeRe: Whose idea was this in C\? Pin
Randor 16-Mar-22 7:11
professional Randor 16-Mar-22 7:11 
GeneralRe: Whose idea was this in C\? Pin
Greg Utas16-Mar-22 7:16
mveGreg Utas16-Mar-22 7:16 
QuestionRe: Whose idea was this in C\? Pin
Randor 16-Mar-22 7:45
professional Randor 16-Mar-22 7:45 
AnswerRe: Whose idea was this in C\? Pin
Greg Utas16-Mar-22 8:01
mveGreg Utas16-Mar-22 8:01 
I'm always willing to play the straight man!

The main problem with auto is that the type ends up being something that you need to consider more carefully:
C++
for(auto i = container.size() - 1; i >= 0; --i)...
and you've got an infinite loop because i is unsigned. I've been burned by this a few times, so have learned to write int instead of auto here. But that overrides the type; "correctly" saying size_t would cause the same problem.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.

JokeRe: Whose idea was this in C\? Pin
Randor 16-Mar-22 12:01
professional Randor 16-Mar-22 12:01 
GeneralRe: Whose idea was this in C\? Pin
Keefer S17-Mar-22 3:51
Keefer S17-Mar-22 3:51 
PraiseRe: Whose idea was this in C\? Pin
Randor 17-Mar-22 6:05
professional Randor 17-Mar-22 6:05 
GeneralRe: Whose idea was this in C\? Pin
Kate-X25717-Mar-22 5:57
Kate-X25717-Mar-22 5:57 
GeneralRe: Whose idea was this in C\? Pin
Greg Utas17-Mar-22 7:00
mveGreg Utas17-Mar-22 7:00 
GeneralRe: Whose idea was this in C\? Pin
Ralph Trickey17-Mar-22 12:31
Ralph Trickey17-Mar-22 12:31 
GeneralRe: Whose idea was this in C\? Pin
Greg Utas17-Mar-22 12:48
mveGreg Utas17-Mar-22 12:48 
GeneralRe: Whose idea was this in C\? Pin
Dave B 202217-Mar-22 4:31
Dave B 202217-Mar-22 4:31 
GeneralRe: Whose idea was this in C\? Pin
Greg Utas17-Mar-22 4:54
mveGreg Utas17-Mar-22 4:54 
GeneralRe: Whose idea was this in C\? Pin
Dave B 202217-Mar-22 6:31
Dave B 202217-Mar-22 6:31 
GeneralRe: Whose idea was this in C\? Pin
Greg Utas17-Mar-22 6:55
mveGreg Utas17-Mar-22 6:55 
GeneralRe: Whose idea was this in C\? Pin
Kate-X25717-Mar-22 5:57
Kate-X25717-Mar-22 5:57 
GeneralRe: Whose idea was this in C\? Pin
Slacker00716-Mar-22 6:39
professionalSlacker00716-Mar-22 6:39 
GeneralRe: Whose idea was this in C\? Pin
JustDre17-Mar-22 8:05
JustDre17-Mar-22 8:05 
GeneralRe: Whose idea was this in C\? Pin
TNCaver16-Mar-22 7:16
TNCaver16-Mar-22 7:16 
GeneralRe: Whose idea was this in C\? Pin
Ralph Trickey17-Mar-22 13:22
Ralph Trickey17-Mar-22 13:22 
GeneralRe: Whose idea was this in C\? Pin
Kate-X25717-Mar-22 5:57
Kate-X25717-Mar-22 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.