C++ extern function error: too many arguments to function

I have a cw.h file with a bunch of extern functions in it that I want to call from my cw.cpp file.

They are expressed like this in the .h. file along with the declarations of the Type struct (just example functions, not the actual names of the functions):

extern Type* new_type(), match(), sharetype();

But their definitions and implementations are in the cw.cpp file. Each of the functions has 1 or more parameters passed into it.

When I try compiling, I keep getting this error message for each of the functions:

cw.h:11: error: too many arguments to function Type new_type()
cw.cpp:575: error: at this point in file

I have no idea how to fix it. And I've been searching for the past hour (-_-)


I changed my code in the .h file to match the types of the parameters being passed into the functions when they're being called. No more errors.


In C++, a function declared with () is a prototype and means that the function takes no arguments. In C++ it is equivalent to using (void). It doesn't have the same meaning as in C (i.e. that the function takes an unspecified number of arguments).

Need Your Help

is a separate NSManagedObjectContext required to roll back coredata changes the user does not OK?

iphone ios core-data nsmanagedobject nsmanagedobjectcontext

Is a separate NSManagedObjectContext required to roll back coredata changes the user does not OK?

To use ServiceMix my project has to be an OSGi bundle?

apache osgi apache-camel servicemix

I' starting to use ServiceMix and Camel and I've run through many examples.

migrating large data between systems

java database web-services jsp design

I need a suggestion to implement a functionality for my application. My application is a legacy JSP , JDBC application installed in client environments used by internal employees of the client. I h...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.