Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GLUT problem Pin
Jeremy Falcon11-Mar-06 20:43
professionalJeremy Falcon11-Mar-06 20:43 
AnswerRe: GLUT problem Pin
beko11-Mar-06 22:56
beko11-Mar-06 22:56 
QuestionIdentifying sequence point errors in VS6 Pin
Chintoo72311-Mar-06 19:30
Chintoo72311-Mar-06 19:30 
AnswerRe: Identifying sequence point errors in VS6 Pin
John R. Shaw11-Mar-06 21:32
John R. Shaw11-Mar-06 21:32 
GeneralRe: Identifying sequence point errors in VS6 Pin
Chintoo72312-Mar-06 0:51
Chintoo72312-Mar-06 0:51 
GeneralRe: Identifying sequence point errors in VS6 Pin
John R. Shaw16-Mar-06 14:51
John R. Shaw16-Mar-06 14:51 
GeneralRe: Identifying sequence point errors in VS6 Pin
Chintoo72318-Mar-06 18:55
Chintoo72318-Mar-06 18:55 
GeneralRe: Identifying sequence point errors in VS6 Pin
John R. Shaw19-Mar-06 12:22
John R. Shaw19-Mar-06 12:22 
I would need to look it up, because I never understood why it would be classified as undefined behaviour.

D'Oh! | :doh: My answer was very weak and I should not have attempted it [without research], becuase it actually applies to the "old argument" below, following my explination of what I ment.

I said "at the least" because if it is undefined behaviour then it would be compiler dependent (non-portable) and a warning should be generated to inform the programmer of this.

I said "at the most" because if it is undefined behaviour then it would be compiler dependent and an error would force the programmer not to write non-poratable code.

I believed it was consider undefined behaviour in the passed, which means the compiler vender could decide what behaviour to apply, and still be fully compliant. This may no longer be the case, as the behaviour may now be deifined.

Here is the old argument:
int i = 0;<br />
i = i++;


Should i now be equal to 0 or 1?

My answer and the answer Microsoft chose is 1, which I think is the only logical answer. But there where those who disagreed and said the answer should be 0, because they believed that was the intent of the progammer.

So if you throw out logic and just consider the intent, then the language would not be able to define the behaviour. I think the real problem was that different venders had already implimented different solutions, before the standared was complete.

When I originaly gave my answer of 1 to that question (years ago), I was informed that my answer was wrong, becuase it was undefined and therefore could be either 0 or 1.

VS6 may be fully compliant for C (?), but it is not fully compliant with the C++ standard.

VS2003, according to Microsoft, is a full ASCII/ISO C++ Standards compliant compiler.

INTP
Every thing is relative...
GeneralRe: Identifying sequence point errors in VS6 Pin
Ryan Binns12-Mar-06 17:31
Ryan Binns12-Mar-06 17:31 
GeneralRe: Identifying sequence point errors in VS6 Pin
John R. Shaw16-Mar-06 15:44
John R. Shaw16-Mar-06 15:44 
AnswerRe: Identifying sequence point errors in VS6 Pin
Trollslayer12-Mar-06 1:45
mentorTrollslayer12-Mar-06 1:45 
GeneralRe: Identifying sequence point errors in VS6 Pin
Chintoo72312-Mar-06 3:44
Chintoo72312-Mar-06 3:44 
GeneralRe: Identifying sequence point errors in VS6 Pin
Trollslayer12-Mar-06 10:06
mentorTrollslayer12-Mar-06 10:06 
QuestionHow to translate applications using resources files Pin
Allad11-Mar-06 17:40
Allad11-Mar-06 17:40 
AnswerRe: How to translate applications using resources files Pin
John R. Shaw11-Mar-06 22:32
John R. Shaw11-Mar-06 22:32 
GeneralRe: How to translate applications using resources files Pin
Allad12-Mar-06 2:00
Allad12-Mar-06 2:00 
GeneralRe: How to translate applications using resources files Pin
John R. Shaw16-Mar-06 15:24
John R. Shaw16-Mar-06 15:24 
QuestionHow can i enumerate all users in PC? Pin
fcoder11-Mar-06 16:41
fcoder11-Mar-06 16:41 
AnswerRe: How can i enumerate all users in PC? Pin
Anton Mikhalyov11-Mar-06 21:13
Anton Mikhalyov11-Mar-06 21:13 
AnswerRe: How can i enumerate all users in PC? Pin
Hamid_RT11-Mar-06 21:14
Hamid_RT11-Mar-06 21:14 
AnswerRe: How can i enumerate all users in PC? Pin
Hamid_RT11-Mar-06 21:24
Hamid_RT11-Mar-06 21:24 
AnswerRe: How can i enumerate all users in PC? Pin
John R. Shaw11-Mar-06 22:42
John R. Shaw11-Mar-06 22:42 
Questionmethod of hook dll Pin
HOW WHAT11-Mar-06 15:15
HOW WHAT11-Mar-06 15:15 
AnswerRe: method of hook dll Pin
Anton Mikhalyov11-Mar-06 18:17
Anton Mikhalyov11-Mar-06 18:17 
GeneralRe: method of hook dll Pin
HOW WHAT11-Mar-06 18:41
HOW WHAT11-Mar-06 18:41 

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.