Click here to Skip to main content
15,895,256 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTemplate class and const parameters Pin
Nishad S19-Dec-05 20:47
Nishad S19-Dec-05 20:47 
AnswerRe: Template class and const parameters Pin
vikas amin19-Dec-05 23:24
vikas amin19-Dec-05 23:24 
GeneralRe: Template class and const parameters Pin
Nishad S20-Dec-05 0:01
Nishad S20-Dec-05 0:01 
GeneralRe: Template class and const parameters Pin
vikas amin20-Dec-05 0:19
vikas amin20-Dec-05 0:19 
GeneralRe: Template class and const parameters Pin
Nishad S20-Dec-05 0:29
Nishad S20-Dec-05 0:29 
GeneralRe: Template class and const parameters Pin
vikas amin20-Dec-05 1:31
vikas amin20-Dec-05 1:31 
GeneralRe: Template class and const parameters Pin
Nishad S20-Dec-05 1:43
Nishad S20-Dec-05 1:43 
AnswerRe: Template class and const parameters Pin
Zdeslav Vojkovic20-Dec-05 0:05
Zdeslav Vojkovic20-Dec-05 0:05 
replace LPCSTR with LPSTR.

you instantiate a DataList specialization on char* parameter, but you send incorrect parameter type to AddNode().

AddNode expect constant instance of type T (therefore, constant pointer to char, or char* const),
but you send a pointer to constant char (const char*).

although the syntax looks similar, semantics is quite different. please look it up in language reference.

hope this helps

-- modified at 6:06 Tuesday 20th December, 2005
of course, be aware that literal strings can't really be modified because they are placed in protected part of memory (executable image), so if you write

LPSTR str = "Hello"; // Const char string       <br />
str[1] = 'a';


you will get an access violation.

-- modified at 6:15 Tuesday 20th December, 2005
AnswerRe: Template class and const parameters Pin
khan++20-Dec-05 0:31
khan++20-Dec-05 0:31 
QuestionHow to include dlls in VC++.NET application. Pin
snprani19-Dec-05 20:34
snprani19-Dec-05 20:34 
Questionsaving locations of ActiveX in application Pin
Sac87Rak19-Dec-05 20:23
Sac87Rak19-Dec-05 20:23 
QuestionGetting Problem when using NetMeeting SDK Pin
trinadh_t19-Dec-05 20:09
trinadh_t19-Dec-05 20:09 
QuestionNeed help Pin
coolsab19-Dec-05 20:09
coolsab19-Dec-05 20:09 
AnswerRe: Need help Pin
ThatsAlok19-Dec-05 21:33
ThatsAlok19-Dec-05 21:33 
AnswerRe: Need help Pin
vikas amin19-Dec-05 22:59
vikas amin19-Dec-05 22:59 
Questionindex server catalogs Pin
akshayswaroop19-Dec-05 19:33
akshayswaroop19-Dec-05 19:33 
QuestionAbout termintaing System processes.. Pin
Supriya Tonape19-Dec-05 19:30
Supriya Tonape19-Dec-05 19:30 
AnswerRe: About termintaing System processes.. Pin
kakan19-Dec-05 21:19
professionalkakan19-Dec-05 21:19 
GeneralRe: About termintaing System processes.. Pin
Supriya Tonape20-Dec-05 21:56
Supriya Tonape20-Dec-05 21:56 
AnswerRe: About termintaing System processes.. Pin
ThatsAlok19-Dec-05 21:26
ThatsAlok19-Dec-05 21:26 
GeneralRe: About termintaing System processes.. Pin
Supriya Tonape20-Dec-05 22:03
Supriya Tonape20-Dec-05 22:03 
GeneralRe: About termintaing System processes.. Pin
ThatsAlok20-Dec-05 22:25
ThatsAlok20-Dec-05 22:25 
GeneralRe: About termintaing System processes.. Pin
ThatsAlok20-Dec-05 22:58
ThatsAlok20-Dec-05 22:58 
GeneralRe: About termintaing System processes.. Pin
Supriya Tonape21-Dec-05 18:55
Supriya Tonape21-Dec-05 18:55 
GeneralRe: About termintaing System processes.. Pin
ThatsAlok21-Dec-05 20:01
ThatsAlok21-Dec-05 20:01 

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.