![]() |
| ||
| build but wont run... hmmm please help. i wrote this program to input 12 intigers (mustuse linked lists), sort it while its being inserted, then take the average, then take out the numbers that are greater then the average and make a new lists, then take a second list of 12 intigers, then lastly merge those 2 lists into one that eliminates duplicates. the program will build but when i run it (2003 builder) i get 'fatal error' pop up as soon as i press enter after putting in the first intiger. It is very frustrating. There is nothing more specific, just fatal error. Can anyone find the issue? I am a newbie, please be patient with me #include <iostream> |
| ||
| Re: build but wont run... hmmm please help. 1. Write some comments in the code. 2. Nice of you to use code tags, did you know that you can also add the language name to it for syntax highlighting. 3. Problem might be that next is not initialized to NULL. So on line 110 after first iteration current is set to junk. 4. To find such errors, you gotta write some traces (couts with values of variables) in the code (or use a debugger like VS or Sun Workshop or CodeBlocks or gdb...) |
| ||
| Re: build but wont run... hmmm please help. I think thekashyap is right about uninitialized variables -- add a constructor to the node_type class that initializes the variables to 0. |
| ||
| Re: build but wont run... hmmm please help. can someone please give me an example of how to do what was mentioned? I am sorry, i am new at this. |
| ||
| Re: build but wont run... hmmm please help. Pickup any C++ book n it'll tell you what's a c'tor, this being such a basic thing, it's best if you learn rather than we giving the code.. |
| All times are GMT -4. The time now is 12:59 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC