Click here to Skip to main content
15,899,314 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBubblesort help Pin
kbury13-Nov-09 4:44
kbury13-Nov-09 4:44 
AnswerRe: Bubblesort help Pin
«_Superman_»13-Nov-09 5:03
professional«_Superman_»13-Nov-09 5:03 
AnswerRe: Bubblesort help Pin
David Crow13-Nov-09 5:06
David Crow13-Nov-09 5:06 
GeneralRe: Bubblesort help Pin
kbury13-Nov-09 6:37
kbury13-Nov-09 6:37 
QuestionRe: Bubblesort help Pin
David Crow13-Nov-09 6:40
David Crow13-Nov-09 6:40 
AnswerRe: Bubblesort help Pin
kbury13-Nov-09 6:48
kbury13-Nov-09 6:48 
QuestionRe: Bubblesort help Pin
David Crow13-Nov-09 7:42
David Crow13-Nov-09 7:42 
GeneralRe: Bubblesort help Pin
CPallini13-Nov-09 7:13
mveCPallini13-Nov-09 7:13 
In function fillArray:
kbury wrote:
P=-1;

is wrong, change to
PASS = -1;



In function printArray
kbury wrote:
N[P] = N[PASS];

is wrong, change to:
N[PASS] = N[P];



Some remarks (feel free to ignore...)
  • There are better ways for implementing the fillArray function (i.e. avoiding the 'duplicates' extraction).
  • Messing up with the loop index is a very inelegant practice.
  • printArray really should be called sortArray.


Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Bubblesort help Pin
kbury13-Nov-09 7:23
kbury13-Nov-09 7:23 
GeneralRe: Bubblesort help Pin
CPallini13-Nov-09 8:05
mveCPallini13-Nov-09 8:05 
Questionhow can i retrieve the desitnation path of the icons on the desktop Pin
nenfa13-Nov-09 2:02
nenfa13-Nov-09 2:02 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
David Crow13-Nov-09 3:12
David Crow13-Nov-09 3:12 
GeneralRe: how can i retrieve the desitnation path of the icons on the desktop Pin
nenfa14-Nov-09 20:27
nenfa14-Nov-09 20:27 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
David Crow15-Nov-09 8:28
David Crow15-Nov-09 8:28 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
«_Superman_»13-Nov-09 5:04
professional«_Superman_»13-Nov-09 5:04 
GeneralRe: how can i retrieve the desitnation path of the icons on the desktop Pin
nenfa14-Nov-09 20:25
nenfa14-Nov-09 20:25 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
nenfa14-Nov-09 22:18
nenfa14-Nov-09 22:18 
QuestionHow To Overcome DEBUG ASSERTION FAILED In VC++ Pin
ram8413-Nov-09 0:31
ram8413-Nov-09 0:31 
AnswerRe: How To Overcome DEBUG ASSERTION FAILED In VC++ Pin
Rajesh R Subramanian13-Nov-09 0:54
professionalRajesh R Subramanian13-Nov-09 0:54 
GeneralRe: How To Overcome DEBUG ASSERTION FAILED In VC++ Pin
CPallini13-Nov-09 3:29
mveCPallini13-Nov-09 3:29 
JokeRe: How To Overcome DEBUG ASSERTION FAILED In VC++ Pin
Rajesh R Subramanian13-Nov-09 3:34
professionalRajesh R Subramanian13-Nov-09 3:34 
QuestionHow to get the pixel values of character drawn inside rectangle present on dialog in vc++,mfc Pin
prerananit12-Nov-09 23:50
prerananit12-Nov-09 23:50 
QuestionCompare XMLs Pin
josepe325212-Nov-09 23:46
josepe325212-Nov-09 23:46 
QuestionCheck windows TaskManager Pin
MsmVc12-Nov-09 23:44
MsmVc12-Nov-09 23:44 
QuestionRe: Check windows TaskManager Pin
David Crow13-Nov-09 3:17
David Crow13-Nov-09 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.