Welcome, Guest. Please login or register.

Author Topic: GAH!!!! Help w/passing array of structure to a function...  (Read 1628 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
GAH!!!! Help w/passing array of structure to a function...
« on: January 12, 2005, 05:02:02 AM »
example...


struct tele2_struct{
   fname[30];
   lname[30];
   whatever[70];
}db[750];


int search_array(struct tele2_struct, char parm_searchvar);

then in main() I have something similiar like...

found_record = search_array(db, searchvar);

I basically want to pass a array which contains various info and what they are searching for which is stored in searchvar.. but I get a error @ found_record which says...

 conversion from `tele2_struct*' to non-scalar type `
   tele2_struct' requested


and I'm lookin at examples here and there..but I cannot find one similiar to mine... stumped by something simple which I cannot figure out.
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143
 

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
Re: GAH!!!! Help w/passing array of structure to a function...
« Reply #1 on: January 12, 2005, 12:29:30 PM »
LOL...yep...that'd be it..  thanks!
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143