View Single Post
  #1   Spotlight this post!  
Unread 26-01-2010, 16:27
Rafael Vasquez Rafael Vasquez is offline
Registered User
FRC #1245
 
Join Date: Jan 2010
Location: Louisville
Posts: 10
Rafael Vasquez is an unknown quantity at this point
Function returning a struct

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?
Reply With Quote