Click here to Skip to main content
14,358,698 members

C / C++ / MFC

 
QuestionRe: error C2059 Pin
David Crow20-Aug-19 4:35
memberDavid Crow20-Aug-19 4:35 
AnswerRe: error C2059 Pin
speedbump9920-Aug-19 10:01
memberspeedbump9920-Aug-19 10:01 
GeneralRe: error C2059 Pin
_Flaviu20-Aug-19 23:04
member_Flaviu20-Aug-19 23:04 
GeneralRe: error C2059 Pin
_Flaviu20-Aug-19 23:14
member_Flaviu20-Aug-19 23:14 
GeneralRe: error C2059 Pin
Stefan_Lang20-Aug-19 23:31
memberStefan_Lang20-Aug-19 23:31 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 0:22
member_Flaviu21-Aug-19 0:22 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 0:28
member_Flaviu21-Aug-19 0:28 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 0:39
member_Flaviu21-Aug-19 0: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 1:03
protectorRichard MacCutchan21-Aug-19 1:03 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 1:52
member_Flaviu21-Aug-19 1:52 
GeneralRe: error C2059 Pin
Victor Nijegorodov21-Aug-19 3:08
memberVictor Nijegorodov21-Aug-19 3:08 
GeneralRe: error C2059 Pin
Victor Nijegorodov21-Aug-19 3:17
memberVictor Nijegorodov21-Aug-19 3:17 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 3:38
member_Flaviu21-Aug-19 3:38 
GeneralRe: error C2059 Pin
Richard MacCutchan21-Aug-19 4:59
protectorRichard MacCutchan21-Aug-19 4:59 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 21:50
member_Flaviu21-Aug-19 21:50 
GeneralRe: error C2059 Pin
Stefan_Lang21-Aug-19 6:24
memberStefan_Lang21-Aug-19 6:24 
GeneralRe: error C2059 Pin
_Flaviu21-Aug-19 22:45
member_Flaviu21-Aug-19 22:45 
GeneralRe: error C2059 Pin
Stefan_Lang21-Aug-19 22:51
memberStefan_Lang21-Aug-19 22:51 
GeneralRe: error C2059 Pin
_Flaviu22-Aug-19 0:53
member_Flaviu22-Aug-19 0:53 
AnswerRe: error C2059 Pin
Stefan_Lang21-Aug-19 4:08
memberStefan_Lang21-Aug-19 4:08 
QuestionC++ Program to decompress a compressed string Pin
antoniu20016-Aug-19 7:19
memberantoniu20016-Aug-19 7:19 
AnswerRe: C++ Program to decompress a compressed string Pin
Richard MacCutchan17-Aug-19 2:19
protectorRichard MacCutchan17-Aug-19 2:19 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20017-Aug-19 2:39
memberantoniu20017-Aug-19 2:39 
GeneralRe: C++ Program to decompress a compressed string Pin
Richard MacCutchan17-Aug-19 4:02
protectorRichard MacCutchan17-Aug-19 4:02 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20017-Aug-19 4:12
memberantoniu20017-Aug-19 4: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.