954,206 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

program does not seems to run to end.

can someone please tell me what i am doing wrong here? My program does not print any output after the attempted bucket sort. It only prints before. It is almost as if it does not run to its end.

Attachments CountDigits.cpp (1.94KB)
quintoncoert
Posting Whiz in Training
266 posts since May 2007
Reputation Points: 160
Solved Threads: 3
 

>It is almost as if it does not run to its end.
That's exactly what's happening. Run it through your debugger and you'll probably die with an access violation.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

Yes it does. At a simple assignment it gives an access violation( Segmentation fault ). Can you tell me what it means?

By the way. Are you not going to join the chess tournament? You once pointed out an important opening principle so I asume that you have some skill?

quintoncoert
Posting Whiz in Training
266 posts since May 2007
Reputation Points: 160
Solved Threads: 3
 

>Can you tell me what it means?
It means you accessed memory outside of where you're supposed to. Check your indexes and make sure that they're always valid. I'd wager that they're not.

>Are you not going to join the chess tournament?
What chess tournament?

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

>Can you tell me what it means?
Do not worry about that. I just solved it. An array was not initialised. Re-assigning some of its values to another array caused errors. I do not really understand why that happens but for now it is fine.

>What chess tournament?
the one being arranged as we speak/write. Go to Geeks' Lounge. There are two chess threads. One is just ...chess... and the other one says ....chess tournament.... It is the second one. Chess Tournament.

quintoncoert
Posting Whiz in Training
266 posts since May 2007
Reputation Points: 160
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You