Reputation:
I am writing a c program and came across the declare() function.
When I searched on web for it, I received results about function declaration and function definition.
I would like to know about the declare() function in c,what it does, what are its parameters, etc.
Here is block of code that uses the function:
char file[50];
strcpy(file,"IS_inst.txt");
declare(file,IS_ins,&IS_inst_count);
strcpy(file,"DS_inst.txt");
declare(file,DS_ins,&DS_inst_count);
strcpy(file,"AD_inst.txt");
declare(file,AD_ins,&AD_inst_count);
strcpy(file,"REG_OPERAND.txt");
declare(file,REG_oprand,®_op_count);
Upvotes: 1
Views: 113
Reputation: 263647
There is no function called declare
in the C standard library, or, as far as I know, in any commonly used add-on library.
There's nothing special about the name declare
. It might as well have been named foobar
.
It must be declared as a function or as a macro somewhere in your program. If your development environment has such a feature, try querying the name (perhaps you can hover over or right-click on the function name if you're using an IDE). Or just search the source file and any headers it #include
s for the name declare
. grep
and ctags
are both useful tools for this kind of thing.
Upvotes: 3
Reputation: 70
Declare function means you are assigning a function's return type. There is no built in function named as "Declare Function". Suppose, you want to create a function to add numbers. So, you can name the function as "Add". In c programming you have to declare the function type at first example: for two integers addition the function type should be int Add() {}
Upvotes: -1
Reputation: 73444
There is no such function in C, it might/should be defined in your program.
Upvotes: 3