Click here to Skip to main content
15,918,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Maximilien21-May-24 5:28
Maximilien21-May-24 5:28 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
jschell21-May-24 12:22
jschell21-May-24 12:22 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
CPallini21-May-24 20:41
mveCPallini21-May-24 20:41 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Richard MacCutchan21-May-24 22:37
mveRichard MacCutchan21-May-24 22:37 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
jschell23-May-24 13:17
jschell23-May-24 13:17 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Richard Andrew x6423-May-24 14:09
professionalRichard Andrew x6423-May-24 14:09 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Richard MacCutchan23-May-24 22:13
mveRichard MacCutchan23-May-24 22:13 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
k505424-May-24 8:55
mvek505424-May-24 8:55 
In your example, it should be noted that if the target CPU requires that an int have, for example, an even byte alignment, you may get an exception when trying to dereference the int pointer.

I also wondered if you meant to increment the int pointer inside the loop, in which case, at some point you would invoke undefined behavior. Unless, of course, sizeof(int) == sizeof(char). Which isn't impossible, but I don't know of any system where that might be true. Maybe a 6502 or other 8bit system?
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Richard MacCutchan24-May-24 22:43
mveRichard MacCutchan24-May-24 22:43 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
jschell27-May-24 12:10
jschell27-May-24 12:10 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Richard MacCutchan27-May-24 21:57
mveRichard MacCutchan27-May-24 21:57 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
trønderen28-May-24 5:19
trønderen28-May-24 5:19 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
jschell29-May-24 5:26
jschell29-May-24 5:26 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
trønderen29-May-24 6:53
trønderen29-May-24 6:53 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
charlieg21-May-24 8:02
charlieg21-May-24 8:02 
AnswerRe: Okay, real C++ question - who makes use of the auto keyword? Pin
11917640 Member 21-May-24 22:09
11917640 Member 21-May-24 22:09 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
charlieg21-May-24 23:47
charlieg21-May-24 23:47 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
11917640 Member 22-May-24 0:00
11917640 Member 22-May-24 0:00 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
charlieg22-May-24 0:05
charlieg22-May-24 0:05 
AnswerRe: Okay, real C++ question - who makes use of the auto keyword? Pin
honey the codewitch13-Jun-24 12:43
mvahoney the codewitch13-Jun-24 12:43 
Questionmfc, vs2022 compatible? Pin
charlieg17-May-24 7:21
charlieg17-May-24 7:21 
AnswerRe: mfc, vs2022 compatible? Pin
Victor Nijegorodov17-May-24 7:39
Victor Nijegorodov17-May-24 7:39 
GeneralRe: mfc, vs2022 compatible? Pin
charlieg17-May-24 7:56
charlieg17-May-24 7:56 
AnswerRe: mfc, vs2022 compatible? Pin
RedDk17-May-24 9:39
RedDk17-May-24 9:39 
GeneralRe: mfc, vs2022 compatible? Pin
charlieg17-May-24 10:51
charlieg17-May-24 10:51 

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.