Click here to Skip to main content
14,303,726 members

C / C++ / MFC

 
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
protectorRichard 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
memberStefan_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
memberStefan_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
memberStefan_Lang21-Aug-19 3:08 
After referring to the SO link you helpfully provided, I finally understand what this macro is intended for.

The solution is simple: don't use this macro! It is intended for an extremely specific purpose with specific classes/structs, and it must be used with very specific arguments. If you don't know how to use it correctly, the preprocessor will generate garbagage code, and the compiler unintellegible errors!

The purpose is some low level memory address juggling which makes a whole lot of assumptions on behalf of the parameters being passed, without giving the compiler any information about what is going on. This is highly explosive stuff! Obviously you have no idea what parameters to pass and how to use it, probably not even what to use it for. Please don't do that and stop before anyone gets hurt.

The only thing that's worse than using #define macros in C++ is using other peoples #define macros without being 200% sure what it does and how it's supposed to be used. If you need to ask what it does or why it doesn't work, then just drop it. Instead, just tell us what goal you intend to achieve, so we can advise you on proper C++ ways of solving your problem.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

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
protectorRichard 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
protectorRichard MacCutchan17-Aug-19 3:02 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20017-Aug-19 3:12
memberantoniu20017-Aug-19 3:12 
GeneralRe: C++ Program to decompress a compressed string Pin
Richard MacCutchan17-Aug-19 3:22
protectorRichard MacCutchan17-Aug-19 3:22 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20017-Aug-19 3:24
memberantoniu20017-Aug-19 3:24 
GeneralRe: C++ Program to decompress a compressed string Pin
Richard MacCutchan17-Aug-19 3:59
protectorRichard MacCutchan17-Aug-19 3:59 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20017-Aug-19 4:02
memberantoniu20017-Aug-19 4:02 
GeneralRe: C++ Program to decompress a compressed string Pin
Richard MacCutchan17-Aug-19 4:19
protectorRichard MacCutchan17-Aug-19 4:19 
GeneralRe: C++ Program to decompress a compressed string Pin
David Crow19-Aug-19 4:49
memberDavid Crow19-Aug-19 4:49 
AnswerRe: C++ Program to decompress a compressed string Pin
Patrice T17-Aug-19 19:16
mvePatrice T17-Aug-19 19:16 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20018-Aug-19 2:42
memberantoniu20018-Aug-19 2:42 
AnswerRe: C++ Program to decompress a compressed string Pin
Randor 18-Aug-19 12:49
professional Randor 18-Aug-19 12:49 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20018-Aug-19 23:05
memberantoniu20018-Aug-19 23:05 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 18-Aug-19 23:17
professional Randor 18-Aug-19 23:17 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20018-Aug-19 23:27
memberantoniu20018-Aug-19 23:27 

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.