Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: how to get rid of this error *** fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory ***** Pin
David Crow23-Jun-14 6:01
David Crow23-Jun-14 6:01 
AnswerRe: how to get rid of this error *** fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory ***** Pin
Member 109213042-Jul-14 22:03
Member 109213042-Jul-14 22:03 
QuestionMFC small help please Pin
dan6060622-Jun-14 20:27
dan6060622-Jun-14 20:27 
AnswerRe: MFC small help please Pin
«_Superman_»22-Jun-14 20:48
professional«_Superman_»22-Jun-14 20:48 
GeneralRe: MFC small help please Pin
dan6060622-Jun-14 22:32
dan6060622-Jun-14 22:32 
GeneralRe: MFC small help please Pin
_Flaviu23-Jun-14 22:10
_Flaviu23-Jun-14 22:10 
Questioncan be p[-1] dereferenced? Pin
sakthimuhuu22-Jun-14 18:54
sakthimuhuu22-Jun-14 18:54 
AnswerRe: can be p[-1] dereferenced? Pin
«_Superman_»22-Jun-14 20:22
professional«_Superman_»22-Jun-14 20:22 
The statement is perfectly valid "in this case".
Using an index will simply add it to the address.
So p[-1] will internally become *(p-1).

In this case, since you're incrementing p twice, p[-1] should print e.

Correction - My earlier comment would be true if you change the statement to printf("%c", p[-1]);
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++) (October 2009 - September 2013)

Polymorphism in C


modified 23-Jun-14 4:07am.

AnswerRe: can be p[-1] dereferenced? Pin
Jochen Arndt22-Jun-14 21:00
professionalJochen Arndt22-Jun-14 21:00 
AnswerRe: can be p[-1] dereferenced? Pin
CPallini22-Jun-14 22:16
mveCPallini22-Jun-14 22:16 
GeneralRe: can be p[-1] dereferenced? Pin
sakthimuhuu24-Jun-14 2:11
sakthimuhuu24-Jun-14 2:11 
QuestionRe: can be p[-1] dereferenced? Pin
CPallini24-Jun-14 2:21
mveCPallini24-Jun-14 2:21 
AnswerRe: can be p[-1] dereferenced? Pin
Satya Chamakuri12-Aug-14 21:38
Satya Chamakuri12-Aug-14 21:38 
QuestionDirectShow not showing mp4 & WndProc Not working Pin
AmbiguousName20-Jun-14 1:23
AmbiguousName20-Jun-14 1:23 
AnswerRe: Can not Get Notification using WndProc Pin
Richard MacCutchan20-Jun-14 1:30
mveRichard MacCutchan20-Jun-14 1:30 
GeneralRe: Can not Get Notification using WndProc Pin
AmbiguousName20-Jun-14 2:04
AmbiguousName20-Jun-14 2:04 
GeneralRe: Can not Get Notification using WndProc Pin
Richard MacCutchan20-Jun-14 2:11
mveRichard MacCutchan20-Jun-14 2:11 
Questionswprintf_s with *wstring (Resolved) Pin
bkelly1319-Jun-14 6:39
bkelly1319-Jun-14 6:39 
QuestionRe: swprintf_s with *wstring Pin
David Crow19-Jun-14 6:54
David Crow19-Jun-14 6:54 
AnswerRe: swprintf_s with *wstring Pin
bkelly1319-Jun-14 7:11
bkelly1319-Jun-14 7:11 
QuestionRe: swprintf_s with *wstring Pin
David Crow19-Jun-14 9:53
David Crow19-Jun-14 9:53 
AnswerRe: swprintf_s with *wstring Pin
Graham Breach19-Jun-14 7:09
Graham Breach19-Jun-14 7:09 
GeneralRe: swprintf_s with *wstring Pin
bkelly1319-Jun-14 7:21
bkelly1319-Jun-14 7:21 
GeneralRe: swprintf_s with *wstring Pin
Richard MacCutchan19-Jun-14 23:28
mveRichard MacCutchan19-Jun-14 23:28 
QuestionCould not get the ConnectionString from Registry Key Pin
Member 1089437819-Jun-14 0:04
Member 1089437819-Jun-14 0:04 

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.