Click here to Skip to main content
16,011,170 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Trouble with const Pin
Leslie Sanford31-Aug-07 13:41
Leslie Sanford31-Aug-07 13:41 
GeneralRe: Trouble with const Pin
Mark Salsbery31-Aug-07 13:52
Mark Salsbery31-Aug-07 13:52 
QuestionRe: Trouble with const Pin
Mark Salsbery31-Aug-07 13:54
Mark Salsbery31-Aug-07 13:54 
AnswerRe: Trouble with const Pin
Leslie Sanford31-Aug-07 14:22
Leslie Sanford31-Aug-07 14:22 
GeneralRe: Trouble with const Pin
Mark Salsbery31-Aug-07 15:36
Mark Salsbery31-Aug-07 15:36 
GeneralRe: Trouble with const Pin
Leslie Sanford31-Aug-07 16:02
Leslie Sanford31-Aug-07 16:02 
GeneralRe: Trouble with const Pin
Mark Salsbery1-Sep-07 7:05
Mark Salsbery1-Sep-07 7:05 
AnswerRe: Trouble with const Pin
Leslie Sanford31-Aug-07 15:04
Leslie Sanford31-Aug-07 15:04 
I think I've figured out the problem. Arrays are const by default. That is the array variable is const, not its contents. This is illegal:

unsigned char a[100];
unsigned char b[100];
 
a = b;


So declaring an array as const...

const unsigned char a[100];


...seems to be interpretted by the compiler as unsigned char const * const, whatever the heck that is. An unsigned char const pointer to const... something.

At any rate, it does not evaluate to const unsigned char *. So when I tried passing it to the setter method, the compiler seemed to have a problem with that. If I remove the const modifier on the array, it compiles and runs ok.

What I was intending was to make an arrays contents read only. I haven't figured out how to do that.
GeneralRe: Trouble with const Pin
Mark Salsbery31-Aug-07 15:33
Mark Salsbery31-Aug-07 15:33 
QuestionHow ot verify whether or not a user is a member of a local or domain group? Pin
Homayoun231-Aug-07 13:12
Homayoun231-Aug-07 13:12 
QuestionMFC Control Design Pattern Question Pin
@largeinsd31-Aug-07 10:56
@largeinsd31-Aug-07 10:56 
QuestionCStdioFile issue Pin
__yash__31-Aug-07 10:40
professional__yash__31-Aug-07 10:40 
AnswerRe: CStdioFile issue Pin
__yash__31-Aug-07 10:48
professional__yash__31-Aug-07 10:48 
QuestionCListCtrl::SetBkImage(): how disable the image scroll? Pin
Cris31-Aug-07 8:27
Cris31-Aug-07 8:27 
AnswerRe: CListCtrl::SetBkImage(): how disable the image scroll? Pin
Cris3-Sep-07 3:13
Cris3-Sep-07 3:13 
QuestionCancel opening a file Pin
AeJai31-Aug-07 8:10
AeJai31-Aug-07 8:10 
AnswerRe: Cancel opening a file Pin
PJ Arends31-Aug-07 9:38
professionalPJ Arends31-Aug-07 9:38 
QuestionWM_TIMER Pin
__yash__31-Aug-07 7:28
professional__yash__31-Aug-07 7:28 
AnswerRe: WM_TIMER Pin
Mark Salsbery31-Aug-07 8:01
Mark Salsbery31-Aug-07 8:01 
GeneralRe: WM_TIMER Pin
Waldermort31-Aug-07 9:33
Waldermort31-Aug-07 9:33 
GeneralRe: WM_TIMER Pin
Mark Salsbery31-Aug-07 9:42
Mark Salsbery31-Aug-07 9:42 
AnswerRe: WM_TIMER Pin
Waldermort31-Aug-07 9:34
Waldermort31-Aug-07 9:34 
GeneralRe: WM_TIMER Pin
__yash__31-Aug-07 9:40
professional__yash__31-Aug-07 9:40 
QuestionSetWindowPos & GetWindowRect Pin
Mr Simple31-Aug-07 7:05
Mr Simple31-Aug-07 7:05 
AnswerRe: SetWindowPos & GetWindowRect Pin
Mark Salsbery31-Aug-07 7:13
Mark Salsbery31-Aug-07 7:13 

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.