https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp
Line 22 => Where is declare "ScriptError" ? What does the "*" mean ?
"inline bool set_success(ScriptError* ret)"
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityhttps://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp
Line 22 => Where is declare "ScriptError" ? What does the "*" mean ?
"inline bool set_success(ScriptError* ret)"
The enum ScriptError
is defined in https://github.com/bitcoin/bitcoin/blob/master/src/script/script_error.h, and the *
means that set_success
requires you to pass a pointer to an enum value rather than the enum value itself.
I have to tell you, however, that if you are asking questions like "What does the "*" mean?", then you are going to have a hard time understanding C++ code. I highly recommend doing some tutorials on C++ programming before going any further.
*ScriptError
would mean dereferencing a variable named "ScriptError". For example, see line 25 interpreter.cpp, where ret
is dereferenced in order to assign a new value. I think you are thinking of writing set_success(ScriptError* ret)
like set_success(ScriptError *ret)
, instead. In C++, both mean the same thing.
vchSig
called vchSigCopy
. However, it's neither possible nor appropriate for me to teach you C++ in the comments. Some of these questions you've been asking are very fundamental concepts in C++. You really need to take some time to learn the language if you want to understand Bitcoin's code.