Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Pointers, Functions and XCode messages Pin
jschell8-Jun-14 9:12
jschell8-Jun-14 9:12 
GeneralRe: Pointers, Functions and XCode messages Pin
ericgahn8-Jun-14 10:01
ericgahn8-Jun-14 10:01 
AnswerRe: Pointers, Functions and XCode messages Pin
CPallini8-Jun-14 10:00
mveCPallini8-Jun-14 10:00 
GeneralRe: Pointers, Functions and XCode messages Pin
ericgahn8-Jun-14 10:05
ericgahn8-Jun-14 10:05 
GeneralRe: Pointers, Functions and XCode messages Pin
CPallini8-Jun-14 10:11
mveCPallini8-Jun-14 10:11 
Questionhow can use a non-static class member function as the custom deleter of std::unique_ptr? Pin
Falconapollo7-Jun-14 21:18
Falconapollo7-Jun-14 21:18 
AnswerRe: how can use a non-static class member function as the custom deleter of std::unique_ptr? Pin
jschell8-Jun-14 9:17
jschell8-Jun-14 9:17 
Questionpointer to a constant string Pin
bkelly137-Jun-14 12:51
bkelly137-Jun-14 12:51 
Windows 7, visual Studio 2008, C++

 WCHAR *op_type = NULL;
if( x )
   op_type = &L"First";
else
   op_type = &L"Second";

This solicits the error
Quote:
error C2440: '=' : cannot convert from 'const wchar_t (*)[6]' to 'WCHAR *'

What is my syntax error?

I tried the declaration:
const wchar_t *op_type2 = NULL;

and received the error:
Quote:
error C2440: '=' : cannot convert from 'const wchar_t (*)[6]' to 'const wchar_t *'

Which seems wrong to me. Why does the pointer care how long the string is? It is but the address of the first character.
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com



modified 7-Jun-14 20:28pm.

AnswerRe: pointer to a constant string Pin
«_Superman_»7-Jun-14 21:59
professional«_Superman_»7-Jun-14 21:59 
GeneralRe: pointer to a constant string Pin
bkelly138-Jun-14 5:00
bkelly138-Jun-14 5:00 
GeneralRe: pointer to a constant string Pin
leon de boer8-Jun-14 7:50
leon de boer8-Jun-14 7:50 
GeneralRe: pointer to a constant string Pin
CPallini8-Jun-14 10:04
mveCPallini8-Jun-14 10:04 
QuestionIs this Code Valid? Pin
Manikandan106-Jun-14 17:42
professionalManikandan106-Jun-14 17:42 
AnswerRe: Is this Code Valid? Pin
Shao Voon Wong6-Jun-14 18:45
mvaShao Voon Wong6-Jun-14 18:45 
GeneralRe: Is this Code Valid? Pin
Manikandan106-Jun-14 18:54
professionalManikandan106-Jun-14 18:54 
Generalwhat does it do Pin
bkelly137-Jun-14 14:33
bkelly137-Jun-14 14:33 
GeneralRe: what does it do Pin
Richard MacCutchan7-Jun-14 22:34
mveRichard MacCutchan7-Jun-14 22:34 
GeneralRe: what does it do Pin
bkelly138-Jun-14 4:52
bkelly138-Jun-14 4:52 
AnswerRe: Is this Code Valid? Pin
Randor 6-Jun-14 23:43
professional Randor 6-Jun-14 23:43 
GeneralRe: Is this Code Valid? Pin
Manikandan107-Jun-14 0:00
professionalManikandan107-Jun-14 0:00 
Questionabout speex and ogg! Pin
renxiaoyaoa85-Jun-14 21:08
renxiaoyaoa85-Jun-14 21:08 
QuestionWiX Toolset Compiler error Pin
sreehari_mysore5-Jun-14 19:26
sreehari_mysore5-Jun-14 19:26 
AnswerRe: WiX Toolset Compiler error Pin
Richard MacCutchan5-Jun-14 22:08
mveRichard MacCutchan5-Jun-14 22:08 
QuestionMade of libogg ogg files can be directly through the player play? Pin
renxiaoyaoa85-Jun-14 16:10
renxiaoyaoa85-Jun-14 16:10 
AnswerRe: Made of libogg ogg files can be directly through the player play? Pin
Richard MacCutchan5-Jun-14 22:05
mveRichard MacCutchan5-Jun-14 22:05 

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.