![]() |
|
#1
|
|||
|
|||
printing an array of structuresI am writing a program that reads columns of info from a text file, then sorts the info by alphabetical order from the first column. This won't compile, I highlited the problem below, the code where i try to print the sorted data. I tried changing the '.'s to '->'s but that didn't work. Please help!
CPP / C++ / C Code:
CPP / C++ / C Code:
|
|
#2
|
||||
|
||||
Re: printing an array of structuresGuideline #2 please....
__________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#3
|
|||
|
|||
Re: printing an array of structuresCompiler: Bloodshed Dev-C++
Error msg: "subscripted value is neither array nor pointer" I changed the code but it still doesn't compile. It is supposed to print out the siteSorted array of structures. New code (just sortSite function) CPP / C++ / C Code:
|
|
#4
|
|||
|
|||
Re: printing an array of structuresquite alot of errors in ur pgm!
readData(tableArray); \\no reference given... similarly for other functions too... then declaring like: struct table siteSorted; and using it like: printf("%s %s %f %d\n",siteSorted[x].site,siteSorted[x].date,siteSorted[x].reading,siteSorted[x].rating); // just go through it again! |
Recent GIDBlog
I?m Home by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Printing a 2D array as a grid to stdout trouble | nic.nmd | C Programming Language | 6 | 06-Oct-2006 07:45 |
| Need help deleting the last element in the array | headphone69 | C++ Forum | 2 | 15-Mar-2006 20:31 |
| Array printing | Cat | C++ Forum | 19 | 27-Oct-2005 20:38 |
| Pointer Usage in C++: Beginner to Advanced | varunhome | C++ Forum | 0 | 19-Aug-2005 10:25 |
| template comiling problems - need expert debugger! | crq | C++ Forum | 1 | 01-Feb-2005 22:26 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The