Click here to Skip to main content
15,880,796 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: the question of "sizeof"! Pin
David Crow14-Apr-10 3:14
David Crow14-Apr-10 3:14 
AnswerRe: the question of "sizeof"! Pin
Chris Losinger14-Apr-10 3:16
professionalChris Losinger14-Apr-10 3:16 
AnswerRe: the question of "sizeof"! Pin
Stephen Hewitt14-Apr-10 3:16
Stephen Hewitt14-Apr-10 3:16 
AnswerRe: the question of "sizeof"! Pin
CPallini14-Apr-10 3:22
mveCPallini14-Apr-10 3:22 
GeneralRe: the question of "sizeof"! Pin
wbgxx14-Apr-10 3:28
wbgxx14-Apr-10 3:28 
AnswerRe: the question of "sizeof"! Pin
Stephen Hewitt14-Apr-10 4:25
Stephen Hewitt14-Apr-10 4:25 
QuestionRe: the question of "sizeof"! Pin
Chris Meech14-Apr-10 7:02
Chris Meech14-Apr-10 7:02 
AnswerRe: the question of "sizeof"! Pin
CPallini14-Apr-10 11:24
mveCPallini14-Apr-10 11:24 
Chris Meech wrote:
Interesting example, Steve. In your example, does the compiler set N to 12 or 13? I ask because the for loop increments i up to but not including the size, but your template function call passes the value of N-1 to the function. So characters 0-11, all 12 of them, would only be output if the value of N was set to 13. 13 being the 'correct' size when you include the NULL terminator as part of the size of the string. Just an interesting little difference from a lot of the std C string functions.


Mine (VS 2010) puts (as it should) 13. Smile | :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

AnswerRe: the question of "sizeof"! Pin
SpaceMonkey197014-Apr-10 7:59
SpaceMonkey197014-Apr-10 7:59 
GeneralRe: the question of "sizeof"! Pin
Stephen Hewitt14-Apr-10 13:48
Stephen Hewitt14-Apr-10 13:48 
QuestionAvoid "Data Exchange" validation Pin
Code-o-mat14-Apr-10 0:04
Code-o-mat14-Apr-10 0:04 
AnswerRe: Avoid "Data Exchange" validation Pin
Eugen Podsypalnikov14-Apr-10 0:21
Eugen Podsypalnikov14-Apr-10 0:21 
GeneralRe: Avoid "Data Exchange" validation Pin
Code-o-mat14-Apr-10 0:50
Code-o-mat14-Apr-10 0:50 
GeneralRe: Avoid "Data Exchange" validation Pin
Eugen Podsypalnikov14-Apr-10 1:01
Eugen Podsypalnikov14-Apr-10 1:01 
GeneralRe: Avoid "Data Exchange" validation Pin
Code-o-mat14-Apr-10 1:06
Code-o-mat14-Apr-10 1:06 
AnswerRe: Avoid "Data Exchange" validation Pin
Niklas L14-Apr-10 0:57
Niklas L14-Apr-10 0:57 
GeneralRe: Avoid "Data Exchange" validation Pin
Code-o-mat14-Apr-10 1:02
Code-o-mat14-Apr-10 1:02 
AnswerRe: Avoid "Data Exchange" validation Pin
David Crow14-Apr-10 3:08
David Crow14-Apr-10 3:08 
AnswerRe: Avoid "Data Exchange" validation Pin
Maximilien14-Apr-10 4:46
Maximilien14-Apr-10 4:46 
QuestionChanging Printer Settings to ensure Landscape print [modified] Pin
maycockt13-Apr-10 23:27
maycockt13-Apr-10 23:27 
QuestionRe: Changing Printer Settings to ensure Landscape print Pin
David Crow14-Apr-10 3:13
David Crow14-Apr-10 3:13 
AnswerRe: Changing Printer Settings to ensure Landscape print Pin
@Intersect☺™14-Apr-10 4:22
professional@Intersect☺™14-Apr-10 4:22 
Questionexcel Pin
trioum13-Apr-10 23:18
trioum13-Apr-10 23:18 
QuestionRe: excel Pin
enhzflep13-Apr-10 23:46
enhzflep13-Apr-10 23:46 
AnswerRe: excel Pin
@Intersect☺™14-Apr-10 4:24
professional@Intersect☺™14-Apr-10 4:24 

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.