Strange function

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





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.