![]() |
| ||
| Using a struct array Hello there. This is obviously my first post on DaniWeb, as I just found the site in searching for a solution to my issue. I've read over the site rules, as well as the forum rules regarding homework help. Let me start out by saying I am not looking for an easy solution, or some one to do my work. I'm simply trying to figure out why I can't get this darn thing to compile =) I'm using Visual C++ 2005 Express Edition, and have pretty much just started coding an end-of-chapter lab assignment. The issue I'm running into has to do with passing an array of my pre-defined struct into another function. The following is my code. #include <iostream>The errors that I am receiving are: 1>Compiling...Again, this is in the early construction phase, and I don't seem to be having a compiler error... The error seems to come at the linking stage. Any help would be greatly appreciated. Also, this looks like an excellent site and source of information =) Glad I stumbled upon it. |
| ||
| Re: Using a struct array The link error is telling you that you forgot to code the function getData(). This is not a standard C function -- you have to write it yourself. |
| ||
| Re: Using a struct array You have done everything right thus far.. the only thing you haven't done, is to provide "function definitions" for your functions. Below your main( ), go ahead and right up what each function is supposed to do. Here is some pseudo to get ye' started: void getData(menuItemType menu[])make sure each function prototype has an associated function definition and life will == good. |
| ||
| Re: Using a struct array Wow. I appreciate the quick response guys. This dawned on me right after I posted. Doh! I don't know why throwing a struct definition made me throw everything I've learned thus far out the window :-| I appreciate the prompt responses guys! Almost wish I could take down this thread out of embarrasment :rolleyes: |
| All times are GMT -4. The time now is 3:34 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC