Click here to Skip to main content
15,900,254 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFind compression type jpeg image Pin
Game-point27-Jan-10 17:40
Game-point27-Jan-10 17:40 
AnswerRe: Find compression type jpeg image Pin
Rajesh R Subramanian27-Jan-10 18:29
professionalRajesh R Subramanian27-Jan-10 18:29 
QuestionMaking an adaptive studying application [modified] Pin
rbwest8627-Jan-10 14:26
rbwest8627-Jan-10 14:26 
AnswerRe: Making an adaptive studying application Pin
«_Superman_»27-Jan-10 15:53
professional«_Superman_»27-Jan-10 15:53 
GeneralRe: Making an adaptive studying application Pin
rbwest8627-Jan-10 17:32
rbwest8627-Jan-10 17:32 
GeneralRe: Making an adaptive studying application Pin
«_Superman_»27-Jan-10 18:44
professional«_Superman_»27-Jan-10 18:44 
GeneralRe: Making an adaptive studying application Pin
rbwest8627-Jan-10 18:51
rbwest8627-Jan-10 18:51 
GeneralRe: Making an adaptive studying application Pin
«_Superman_»27-Jan-10 18:55
professional«_Superman_»27-Jan-10 18:55 
GeneralRe: Making an adaptive studying application Pin
rbwest8627-Jan-10 19:06
rbwest8627-Jan-10 19:06 
GeneralRe: Making an adaptive studying application Pin
«_Superman_»27-Jan-10 19:16
professional«_Superman_»27-Jan-10 19:16 
GeneralRe: Making an adaptive studying application Pin
rbwest8627-Jan-10 22:10
rbwest8627-Jan-10 22:10 
GeneralRe: Making an adaptive studying application Pin
rbwest8628-Jan-10 3:30
rbwest8628-Jan-10 3:30 
QuestionHow to retrieve request contents in an ISAPI filter? Pin
jackzhangca27-Jan-10 11:05
jackzhangca27-Jan-10 11:05 
QuestionConverting calloc to new. Pin
BubbaGeeNH27-Jan-10 10:15
BubbaGeeNH27-Jan-10 10:15 
AnswerRe: Converting calloc to new. Pin
Chris Losinger27-Jan-10 10:27
professionalChris Losinger27-Jan-10 10:27 
GeneralRe: Converting calloc to new. Pin
Nemanja Trifunovic27-Jan-10 11:06
Nemanja Trifunovic27-Jan-10 11:06 
GeneralRe: Converting calloc to new. Pin
Chris Losinger27-Jan-10 11:09
professionalChris Losinger27-Jan-10 11:09 
AnswerRe: Converting calloc to new. Pin
Nemanja Trifunovic27-Jan-10 11:14
Nemanja Trifunovic27-Jan-10 11:14 
QuestionUnsigned Template Parameter [Solved] Pin
Skippums27-Jan-10 9:04
Skippums27-Jan-10 9:04 
AnswerRe: Unsigned Template Parameter Pin
Richard Andrew x6427-Jan-10 9:20
professionalRichard Andrew x6427-Jan-10 9:20 
GeneralRe: Unsigned Template Parameter Pin
Emilio Garavaglia27-Jan-10 9:43
Emilio Garavaglia27-Jan-10 9:43 
GeneralRe: Unsigned Template Parameter Pin
Skippums27-Jan-10 10:10
Skippums27-Jan-10 10:10 
No, that wouldn't make sense, but it also wouldn't compile. I was under the impression that templates are compiled on a per template-parameter basis... ie, for each distinct set of template parameters, there exists independent assembly at distinct memory addresses. I interpret this as meaning, "As long as a template is syntactically correct, it will be compiled once for each distinct set of template parameters". Therefore, I would expect someone who called my code with class "FooBar" as the template parameter to get an error notifying him/her of an unknown or invalid type, whereas someone compiling with int would work just fine.

As an aside, just because a piece of C++ code can be used in a way that doesn't make sense doesn't mean it is invalid code. The compiler doesn't complain at all if I call numeric_limits<FooBar>::digits, which clearly also doesn't make sense. Sometimes when performing design by contract, verifying that the user abides by the contract is far too expensive to be practical. Most C++ code cannot be written to be idiot-proof.

Sounds like somebody's got a case of the Mondays

-Jeff

Questioncompile a class Pin
mathy27-Jan-10 8:28
mathy27-Jan-10 8:28 
AnswerRe: compile a class Pin
Rajesh R Subramanian27-Jan-10 8:52
professionalRajesh R Subramanian27-Jan-10 8:52 
AnswerRe: compile a class Pin
loyal ginger27-Jan-10 8:53
loyal ginger27-Jan-10 8:53 

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.