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

C / C++ / MFC

 
GeneralRe: Register your program as PC's antivirus Pin
David Crow13-Feb-12 2:47
David Crow13-Feb-12 2:47 
QuestionTranslating the Mod Operator in VB to c++ check Pin
jkirkerx10-Feb-12 10:56
professionaljkirkerx10-Feb-12 10:56 
AnswerRe: Translating the Mod Operator in VB to c++ check Pin
Philippe Mori10-Feb-12 13:03
Philippe Mori10-Feb-12 13:03 
GeneralRe: Translating the Mod Operator in VB to c++ check Pin
jkirkerx10-Feb-12 13:14
professionaljkirkerx10-Feb-12 13:14 
AnswerNeed extra help on this Pin
jkirkerx11-Feb-12 8:56
professionaljkirkerx11-Feb-12 8:56 
AnswerRe: Translating the Mod Operator in VB to c++ check Pin
Dave Doknjas11-Feb-12 14:36
Dave Doknjas11-Feb-12 14:36 
GeneralRe: Translating the Mod Operator in VB to c++ check Pin
jkirkerx12-Feb-12 9:05
professionaljkirkerx12-Feb-12 9:05 
Questioncharacter counting and matching Pin
jkirkerx10-Feb-12 8:52
professionaljkirkerx10-Feb-12 8:52 
I'm missing the boat here on something. I have this constant, and I just want to count how many ampersands are in it. But I keep getting a character or type mismatch, I can't go though each character to check the value.

Overall, it's my idea of how to replace the mid function used in vb. mid(szFormat, 1,1)

const WCHAR LICENSEKEY_FORMAT [] = L"&&&&-&&&&-&&&&-&&&&";


for (int i = 0; i <= dwLength; ++i) {				
	if (wcsncmp(szFormat [i], L"&", 1) ==0) {
		++dwCount;
	}		
}


The error I keep getting is

error C2664: 'wcsncmp' : cannot convert parameter 1 from 'WCHAR' to 'const wchar_t *'

If I szFormat[i] == L"&", I sort of get the same error.

Question:

Is it the const that I made is not stated correctly?, If not, what correction do I need?
AnswerRe: character counting and matching Pin
Richard Andrew x6410-Feb-12 9:21
professionalRichard Andrew x6410-Feb-12 9:21 
GeneralRe: character counting and matching Pin
jkirkerx10-Feb-12 9:42
professionaljkirkerx10-Feb-12 9:42 
AnswerRe: character counting and matching Pin
Jochen Arndt10-Feb-12 22:33
professionalJochen Arndt10-Feb-12 22:33 
GeneralRe: character counting and matching Pin
jkirkerx11-Feb-12 7:41
professionaljkirkerx11-Feb-12 7:41 
AnswerRe: character counting and matching Pin
luckyxjb201018-Feb-12 19:05
luckyxjb201018-Feb-12 19:05 
QuestionAn application between bios and windows! Pin
candogu10-Feb-12 0:54
candogu10-Feb-12 0:54 
AnswerRe: An application between bios and windows! Pin
Richard MacCutchan10-Feb-12 0:59
mveRichard MacCutchan10-Feb-12 0:59 
GeneralRe: An application between bios and windows! Pin
candogu10-Feb-12 1:00
candogu10-Feb-12 1:00 
GeneralRe: An application between bios and windows! Pin
Richard MacCutchan10-Feb-12 1:23
mveRichard MacCutchan10-Feb-12 1:23 
QuestionShellExecute problem Pin
_Flaviu9-Feb-12 23:39
_Flaviu9-Feb-12 23:39 
AnswerRe: ShellExecute problem Pin
Rajesh R Subramanian10-Feb-12 0:02
professionalRajesh R Subramanian10-Feb-12 0:02 
AnswerRe: ShellExecute problem Pin
David Crow10-Feb-12 3:12
David Crow10-Feb-12 3:12 
QuestionBCGPTabWnd OnSize Problem Pin
Jan_fuman9-Feb-12 23:30
Jan_fuman9-Feb-12 23:30 
QuestionEnumDisplaySettings() always returns false Pin
Kiran Satish9-Feb-12 18:45
Kiran Satish9-Feb-12 18:45 
AnswerRe: EnumDisplaySettings() always returns false Pin
_AnsHUMAN_ 9-Feb-12 19:56
_AnsHUMAN_ 9-Feb-12 19:56 
GeneralRe: EnumDisplaySettings() always returns false Pin
Kiran Satish10-Feb-12 3:12
Kiran Satish10-Feb-12 3:12 
GeneralRe: EnumDisplaySettings() always returns false Pin
David Crow10-Feb-12 3:17
David Crow10-Feb-12 3:17 

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.