Click here to Skip to main content
15,885,954 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionEDITED Using template in C++ - run time error Pin
Member 1498043323-Nov-20 6:07
Member 1498043323-Nov-20 6:07 
AnswerRe: Using template in C++ Pin
Richard MacCutchan23-Nov-20 6:25
mveRichard MacCutchan23-Nov-20 6:25 
GeneralRe: Using template in C++ Pin
Member 1498043324-Nov-20 14:34
Member 1498043324-Nov-20 14:34 
GeneralRe: Using template in C++ Pin
Dave Kreskowiak24-Nov-20 19:01
mveDave Kreskowiak24-Nov-20 19:01 
GeneralRe: Using template in C++ Pin
Richard MacCutchan24-Nov-20 22:13
mveRichard MacCutchan24-Nov-20 22:13 
GeneralRe: Using template in C++ Pin
Member 1498043325-Nov-20 6:58
Member 1498043325-Nov-20 6:58 
GeneralRe: Using template in C++ Pin
jeron125-Nov-20 7:23
jeron125-Nov-20 7:23 
GeneralRe: Using template in C++ Pin
Richard MacCutchan25-Nov-20 7:42
mveRichard MacCutchan25-Nov-20 7:42 
Yes, as I mentioned above the one in the innermost scope is the one that will be used; that is the one declared inside the method. But you really should not create variables with the same name like this, it just confuses people, particularly you. See my last sentence in the previous reply for a possible fix to the out of range error. But you should really capture the count first in a variable and test it to see if it returns a ositive value.
GeneralRe: Using template in C++ Pin
Member 1498043325-Nov-20 8:53
Member 1498043325-Nov-20 8:53 
GeneralRe: Using template in C++ Pin
Richard MacCutchan25-Nov-20 9:21
mveRichard MacCutchan25-Nov-20 9:21 
AnswerRe: Using template in C++ Pin
jeron123-Nov-20 6:41
jeron123-Nov-20 6:41 
GeneralRe: Using template in C++ Pin
Member 1498043324-Nov-20 14:27
Member 1498043324-Nov-20 14:27 
GeneralRe: Using template in C++ Pin
jeron124-Nov-20 14:42
jeron124-Nov-20 14:42 
GeneralRe: Using template in C++ Pin
Member 1498043325-Nov-20 6:43
Member 1498043325-Nov-20 6:43 
GeneralRe: Using template in C++ Pin
Richard MacCutchan25-Nov-20 7:57
mveRichard MacCutchan25-Nov-20 7:57 
GeneralRe: Using template in C++ Pin
Victor Nijegorodov25-Nov-20 9:28
Victor Nijegorodov25-Nov-20 9:28 
AnswerRe: EDITED Using template in C++ - run time error Pin
Member 1498043325-Nov-20 17:39
Member 1498043325-Nov-20 17:39 
GeneralRe: EDITED Using template in C++ - run time error Pin
Richard MacCutchan26-Nov-20 0:05
mveRichard MacCutchan26-Nov-20 0:05 
AnswerRe: EDITED Using template in C++ - run time error Pin
Victor Nijegorodov26-Nov-20 1:34
Victor Nijegorodov26-Nov-20 1:34 
GeneralRe: EDITED Using template in C++ - run time error Pin
Member 1498043326-Nov-20 4:59
Member 1498043326-Nov-20 4:59 
GeneralRe: EDITED Using template in C++ - run time error Pin
Richard MacCutchan26-Nov-20 5:48
mveRichard MacCutchan26-Nov-20 5:48 
GeneralRe: EDITED Using template in C++ - run time error Pin
Dave Kreskowiak26-Nov-20 6:28
mveDave Kreskowiak26-Nov-20 6:28 
GeneralRe: EDITED Using template in C++ - run time error Pin
Victor Nijegorodov26-Nov-20 6:50
Victor Nijegorodov26-Nov-20 6:50 
AnswerRe: EDITED Using template in C++ - run time error Pin
jeron126-Nov-20 3:54
jeron126-Nov-20 3:54 
GeneralRe: EDITED Using template in C++ - run time error Pin
Member 1498043326-Nov-20 5:08
Member 1498043326-Nov-20 5:08 

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.