![]() |
Well this was our lecturer code for sorting the numbers in increasing order, well I wanted to compile the codes but it seems to have some errors, appreciate any support.
:
#include <iostream>Thanks. |
first of all, it would have been a good idea to actually include those compiler errors in the post, so everyone don't have to compile the code themselves to see what happens.
Next thing to try is to READ THE CODE! There are a whole bunch of obvious typo's and little errors like missing semicolons. Another thing is a lot of references to the "next"-field of list object - there is no next in the list class. You can't do :
new item = new item;:
item* ni = new item();I suggest you read the literature you're supposed to read, and read it properly. And don't try to pass it off as your lecturer's code, it's just obviously not written by anyone with a little experience, unless he/she was stoned. Which, of course, could have been the case. here's a version that compiles, but it might not work: :
#include <iostream> |
| All times are GMT -5. The time now is 3:20 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC