Originally Posted by
mike65535
Goodness, where did this code come from?
You don't need to identify or call functions with "func" (as it seems perhaps you believe?)
If you are having trouble understanding function calls, you really need to learn about it, and then try a simple example. Leave out the pointers and all that. If you can't get that to work, post it!
Code:
#include <iostream>
using namespace std;
#define maxinstant 1
#define this_error_code 2
void func1(input1)
{
return 1;
}
void func2(input1)
{
return 0;
}
bool_t func( Dip* req )
{
bool_t response = true;
if ( req->inst > maxinstant )
{
req->errorCode = this_error_code;
}
else if ( req->inst == 0 )
{
response = func1( req );
}
else
{
Response = func2( req );
}
return ( response);
}
int main()
{
func(1);
return 0;
}
this is another questions i created this as a test for myself to learn function call
i was wondering if you can help me call function func in main?