cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
what is this argument?
what is this argument?
Mar 22, 2017 at 4:16pm UTC
rajhansk
(66)
I was reading a source code of a software and came across this line of code.
static
void
clear_state_f_static(PluginDef*)
what kind of argument does this function taking?
I am confused because it has asterisk after the name.
Mar 22, 2017 at 4:27pm UTC
Peter87
(11238)
The asterisk means it's a pointer. The function takes
a pointer to a PluginDef
(whatever that is) as argument.
http://www.cplusplus.com/doc/tutorial/pointers/
Mar 22, 2017 at 4:29pm UTC
jonnin
(11443)
you can leave the name off args in function defs.
for example
void foo(int); //int x isnt necessary
void foo(int x)
{
}
so at a guess, PluginDef is a type, and this is a header?
Topic archived. No new replies allowed.