Go to Post When you get a vanity license plate with you team or robot name on it or some other FIRST reference. - Raul [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 27-01-2010, 00:48
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Function returning a struct

Quote:
Originally Posted by Rafael Vasquez View Post
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.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning... Nate Smith Chit-Chat 3 28-07-2008 10:00
Typedef Struct as function input Mike Programming 13 01-11-2005 06:28
Global Struct Arrays and Interrupts Orborde Programming 5 18-02-2005 22:34
Returning from Nationals archiver 1999 0 23-06-2002 22:39
Returning teams..?.. archiver 2000 1 23-06-2002 22:09


All times are GMT -5. The time now is 12:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi