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

C / C++ / MFC

 
AnswerRe: Static linking Pin
Albert Holguin3-Nov-14 11:31
professionalAlbert Holguin3-Nov-14 11:31 
GeneralRe: Static linking Pin
Member 112017883-Nov-14 23:31
Member 112017883-Nov-14 23:31 
AnswerRe: Static linking Pin
Albert Holguin4-Nov-14 4:24
professionalAlbert Holguin4-Nov-14 4:24 
QuestionTemplate Class Pointer - Would like explanation for unexpected behavior Pin
Foothill2-Nov-14 8:01
professionalFoothill2-Nov-14 8:01 
AnswerRe: Template Class Pointer - Would like explanation for unexpected behavior Pin
Richard MacCutchan2-Nov-14 8:13
mveRichard MacCutchan2-Nov-14 8:13 
GeneralRe: Template Class Pointer - Would like explanation for unexpected behavior Pin
Foothill2-Nov-14 8:44
professionalFoothill2-Nov-14 8:44 
AnswerRe: Template Class Pointer - Would like explanation for unexpected behavior Pin
Freak303-Nov-14 2:50
Freak303-Nov-14 2:50 
GeneralRe: Template Class Pointer - Would like explanation for unexpected behavior Pin
Foothill3-Nov-14 5:59
professionalFoothill3-Nov-14 5:59 
Ah, I was thinking that it was something along those lines. I can see now that overloading the subscript operator is only good in certain situations. This doesn't sound like a good approach since it would require different code to access the data behind an object pointer then behind a local variable. I'll just change the accessor to a function.
C++
T GetValueAt(int index)
{
if (index < 0 || index >= _length) 
   throw std::out_of_range("index"); 
return *_array[index];
}

This should work just fine for what I am trying to do.

This was informative, thank you.
GeneralRe: Template Class Pointer - Would like explanation for unexpected behavior Pin
the_foobar3-Dec-14 20:26
the_foobar3-Dec-14 20:26 
AnswerRe: Template Class Pointer - Would like explanation for unexpected behavior Pin
Volynsky Alex4-Nov-14 23:12
professionalVolynsky Alex4-Nov-14 23:12 
QuestionERROR No Target Architecture Pin
ForNow1-Nov-14 17:05
ForNow1-Nov-14 17:05 
SuggestionRe: ERROR No Target Architecture Pin
Richard MacCutchan1-Nov-14 22:03
mveRichard MacCutchan1-Nov-14 22:03 
GeneralRe: ERROR No Target Architecture Pin
ForNow2-Nov-14 4:04
ForNow2-Nov-14 4:04 
GeneralRe: ERROR No Target Architecture Pin
Richard MacCutchan2-Nov-14 5:49
mveRichard MacCutchan2-Nov-14 5:49 
QuestionHow to protect a member function Pin
Drugodrf31-Oct-14 4:35
Drugodrf31-Oct-14 4:35 
AnswerRe: How to protect a member function Pin
Jochen Arndt31-Oct-14 5:18
professionalJochen Arndt31-Oct-14 5:18 
AnswerRe: How to protect a member function Pin
Chris Losinger31-Oct-14 5:18
professionalChris Losinger31-Oct-14 5:18 
GeneralRe: How to protect a member function Pin
Drugodrf3-Nov-14 2:31
Drugodrf3-Nov-14 2:31 
AnswerRe: How to protect a member function Pin
Albert Holguin3-Nov-14 11:39
professionalAlbert Holguin3-Nov-14 11:39 
AnswerRe: How to protect a member function Pin
Aescleal4-Nov-14 2:29
Aescleal4-Nov-14 2:29 
GeneralRe: How to protect a member function Pin
Drugodrf4-Nov-14 7:41
Drugodrf4-Nov-14 7:41 
GeneralRe: How to protect a member function Pin
Aescleal4-Nov-14 21:27
Aescleal4-Nov-14 21:27 
QuestionI can't figure out why my program is not running Pin
Member 1119464630-Oct-14 18:47
Member 1119464630-Oct-14 18:47 
AnswerRe: I can't figure out why my program is not running Pin
enhzflep30-Oct-14 21:12
enhzflep30-Oct-14 21:12 
QuestionResources for OOP practice for C++ Pin
Member 1119427030-Oct-14 14:12
Member 1119427030-Oct-14 14:12 

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.