cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Strange function
Strange function
Aug 2, 2015 at 8:59am UTC
kitman20022002
(1)
I wanted to know what is the middle things called in c++ , I haven't seen it before.
void TW_CALL computeSlopeVarianceTex(void *unused)
void : return value
TW_CALL : ?????? (what is this ?)
computeSlopeVarianceTex : function name
(void *unused) : parameters
Aug 2, 2015 at 3:53pm UTC
keskiverto
(10402)
The TW_CALL is most likely a preprocessor macro that expands to something (or to nothing)
An example of macro definitions:
https://github.com/jdupuy/whitecaps/blob/master/include/AntTweakBar.h
That "something" probably tells the compiler a calling convention to use.
http://stackoverflow.com/questions/297654/what-is-stdcall
The calling conventions are less about C++ and more about format of binary files. A program can call functions from a library, and then both files must use same format. Why more than one format? Legacy issues and different OS conventions.
Topic archived. No new replies allowed.