Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralConvert char* to CString Pin
rajanponnalagu12-Dec-07 23:39
rajanponnalagu12-Dec-07 23:39 
GeneralRe: Convert char* to CString Pin
Sunil Shindekar12-Dec-07 23:51
Sunil Shindekar12-Dec-07 23:51 
GeneralRe: Convert char* to CString Pin
rajanponnalagu13-Dec-07 0:08
rajanponnalagu13-Dec-07 0:08 
GeneralRe: Convert char* to CString Pin
CPallini13-Dec-07 0:11
mveCPallini13-Dec-07 0:11 
GeneralRe: Convert char* to CString Pin
CPallini13-Dec-07 0:29
mveCPallini13-Dec-07 0:29 
GeneralRe: Convert char* to CString Pin
KarstenK13-Dec-07 2:20
mveKarstenK13-Dec-07 2:20 
GeneralTemp folder path Pin
neha.agarwal2712-Dec-07 23:11
neha.agarwal2712-Dec-07 23:11 
GeneralRe: Temp folder path Pin
toxcct12-Dec-07 23:24
toxcct12-Dec-07 23:24 
GeneralRe: Temp folder path Pin
ThatsAlok12-Dec-07 23:36
ThatsAlok12-Dec-07 23:36 
GeneralRe: Temp folder path Pin
Johpoke13-Dec-07 0:55
Johpoke13-Dec-07 0:55 
QuestionHow to get text from a text box control pertaining to cursor position Pin
AmarjeetSinghMatharu12-Dec-07 22:52
AmarjeetSinghMatharu12-Dec-07 22:52 
AnswerRe: How to get text from a text box control pertaining to cursor position Pin
Nelek13-Dec-07 0:46
protectorNelek13-Dec-07 0:46 
GeneralBad handshake in machine<-->PC communication Pin
__yash__12-Dec-07 21:49
professional__yash__12-Dec-07 21:49 
GeneralRe: Bad handshake in machine<-->PC communication Pin
David Crow13-Dec-07 4:23
David Crow13-Dec-07 4:23 
GeneralDifference in OS Pin
Chandrasekharan P12-Dec-07 21:22
Chandrasekharan P12-Dec-07 21:22 
AnswerRe: Difference in OS Pin
CPallini12-Dec-07 21:49
mveCPallini12-Dec-07 21:49 
GeneralRe: Difference in OS Pin
Chandrasekharan P12-Dec-07 22:00
Chandrasekharan P12-Dec-07 22:00 
GeneralRe: Difference in OS Pin
CPallini12-Dec-07 22:08
mveCPallini12-Dec-07 22:08 
GeneralRe: Difference in OS Pin
Chandrasekharan P12-Dec-07 22:16
Chandrasekharan P12-Dec-07 22:16 
GeneralYou're welcome Pin
CPallini12-Dec-07 22:25
mveCPallini12-Dec-07 22:25 
GeneralDeny "Create File" Permission to a User Pin
narayanagvs12-Dec-07 20:10
narayanagvs12-Dec-07 20:10 
GeneralRe: Deny "Create File" Permission to a User Pin
Don Box12-Dec-07 21:40
Don Box12-Dec-07 21:40 
Generaltemplate function v.s. template class [modified] Pin
George_George12-Dec-07 19:43
George_George12-Dec-07 19:43 
Hello everyone,


I am feeling template function is more tricky than template class. For the reason that the compiler will do the matching automatically for template function, but for template class, developer can assign how to match.

Sometimes compiler is doing mysterious matching rules for template function, which makes us confused. Does anyone have the same senses?

Example,

1. for template function

we define

template <class T> void sort ( vector <T>& )


when we invoke like,

sort ( vector<int> )&, T will automatically matched by compiler to int -- we have no control. Sometimes, how compiler will do the matching is mysterious.

2. for template class

developer has full control. For example, when use some template class, developer can assign the type of parameter,

we define,

template <class T> class Foo
{
    // ...
}


when developer use it, we can explicitly assign the type, like Foo <int> or Foo <bool>.

Any comments or experiences or even disagreement is welcome.


thanks in advance,
George

modified on Thursday, December 13, 2007 2:19:41 AM

GeneralRe: template function v.s. template class Pin
Nelek12-Dec-07 21:06
protectorNelek12-Dec-07 21:06 
GeneralRe: template function v.s. template class Pin
George_George12-Dec-07 21:47
George_George12-Dec-07 21:47 

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.