Click here to Skip to main content
14,838,368 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: error C2059 Pin
David Crow20-Aug-19 3:35
MemberDavid Crow20-Aug-19 3:35 
AnswerRe: error C2059 Pin
mo149220-Aug-19 9:01
Membermo149220-Aug-19 9:01 
GeneralRe: error C2059 Pin
_Flaviu20-Aug-19 22:04
Member_Flaviu20-Aug-19 22:04 
GeneralRe: error C2059 Pin
_Flaviu20-Aug-19 22:14
Member_Flaviu20-Aug-19 22:14 
GeneralRe: error C2059 Pin
Stefan_Lang20-Aug-19 22:31
mveStefan_Lang20-Aug-19 22:31 
GeneralRe: error C2059 Pin
_Flaviu20-Aug-19 23:22
Member_Flaviu20-Aug-19 23:22 
GeneralRe: error C2059 Pin
_Flaviu20-Aug-19 23:28
Member_Flaviu20-Aug-19 23:28 
GeneralRe: error C2059 Pin
_Flaviu20-Aug-19 23:39
Member_Flaviu20-Aug-19 23:39 
So, as a conclusion, the code is:
const int nTest = list_next_entry(0, 0);

where list_next_entry is defined:
#define list_next_entry(pos, member)		\
	list_entry((pos)->member.next, typeof(*(pos)), member)

and list_entry is defined as:
#define list_entry(ptr, type, member) \
	((type *)((char *)(ptr)-(size_t)(&((type *)0)->member)))

and for this code I get:
error C2100: illegal indirection
error C2059: syntax error : ')'
error C2059: syntax error : 'bad suffix on number'
error C3861: 'typeof': identifier not found

at line "const int nTest = list_next_entry(0, 0);"
I cannot get rid of these errors ... Frown | :(
GeneralRe: error C2059 Pin
Richard MacCutchan21-Aug-19 0:03
mveRichard MacCutchan21-Aug-19 0:03 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 0:52
Member_Flaviu21-Aug-19 0:52 
GeneralRe: error C2059 Pin
Victor Nijegorodov21-Aug-19 2:08
MemberVictor Nijegorodov21-Aug-19 2:08 
GeneralRe: error C2059 Pin
Victor Nijegorodov21-Aug-19 2:17
MemberVictor Nijegorodov21-Aug-19 2:17 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 2:38
Member_Flaviu21-Aug-19 2:38 
GeneralRe: error C2059 Pin
Richard MacCutchan21-Aug-19 3:59
mveRichard MacCutchan21-Aug-19 3:59 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 20:50
Member_Flaviu21-Aug-19 20:50 
GeneralRe: error C2059 Pin
Stefan_Lang21-Aug-19 5:24
mveStefan_Lang21-Aug-19 5:24 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 21:45
Member_Flaviu21-Aug-19 21:45 
GeneralRe: error C2059 Pin
Stefan_Lang21-Aug-19 21:51
mveStefan_Lang21-Aug-19 21:51 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 23:53
Member_Flaviu21-Aug-19 23:53 
AnswerRe: error C2059 Pin
Stefan_Lang21-Aug-19 3:08
mveStefan_Lang21-Aug-19 3:08 
QuestionC++ Program to decompress a compressed string Pin
antoniu20016-Aug-19 6:19
Memberantoniu20016-Aug-19 6:19 
AnswerRe: C++ Program to decompress a compressed string Pin
Richard MacCutchan17-Aug-19 1:19
mveRichard MacCutchan17-Aug-19 1:19 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20017-Aug-19 1:39
Memberantoniu20017-Aug-19 1:39 
GeneralRe: C++ Program to decompress a compressed string Pin
Richard MacCutchan17-Aug-19 3:02
mveRichard MacCutchan17-Aug-19 3:02 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20017-Aug-19 3:12
Memberantoniu20017-Aug-19 3:12 

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.