please would anyone consider helping me write code? i need help with accessing a function from within the main and within other functions and im not sure how to do it .
Printable View
please would anyone consider helping me write code? i need help with accessing a function from within the main and within other functions and im not sure how to do it .
whats hard about this....
Code:#include<stdio.h>
void func1(void); /* prototype for function */
void func2(void);
int main()
{
func1(); /* function call */
func2();
return 0;
}
void func1(void) /* function definition */
{
printf("We are in func1 now \n");
}
void func2(void)
{
printf("We are in func2 now \n");
}
yes that sounds nice an easy but i need the function to create an index from a specified input of chars and digits. i need to access this function from within another function and then use that index to access a file
simple.....
int GetIndex(char* Key)
{
/* Do stuff with key to get an int index */
return index;
}
then when you call it....
int index;
index=GetIndex("ABC123DEF567");
etc.