Quote:
Originally Posted by Rafael Vasquez
I am having some issues with structure handling. The error I'm getting reads:
expected initializer before 'function_name'
Here is some sample code for what I'm trying to do:
struct my_struct{
int a;
int b;
};
.....
//This next line is the line in which the error occurs
my_struct function_name(my_struct my_argument){
.....
}
Does anyone have any ideas on what is causing this and how to fix it?
|
Code:
struct my_struct fuctionname(struct my_struct argName)
Or you can typedef the struct.