Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWM_NCCALCSIZE bug with Vista Desktop Composition Pin
sanguino.jose31-Mar-09 5:06
sanguino.jose31-Mar-09 5:06 
Questionurl filtering Pin
aks.31-Mar-09 4:58
aks.31-Mar-09 4:58 
QuestionAny Suggetions for an efficient way? Pin
FISH78631-Mar-09 4:57
FISH78631-Mar-09 4:57 
QuestionRe: Any Suggetions for an efficient way? Pin
David Crow31-Mar-09 5:06
David Crow31-Mar-09 5:06 
AnswerRe: Any Suggetions for an efficient way? Pin
FISH78631-Mar-09 5:07
FISH78631-Mar-09 5:07 
GeneralRe: Any Suggetions for an efficient way? Pin
David Crow31-Mar-09 5:27
David Crow31-Mar-09 5:27 
GeneralRe: Any Suggetions for an efficient way? Pin
Stephen Hewitt31-Mar-09 17:08
Stephen Hewitt31-Mar-09 17:08 
GeneralRe: Any Suggetions for an efficient way? Pin
CPallini31-Mar-09 22:13
mveCPallini31-Mar-09 22:13 
I would do (to mimic the extraction of random number from a bag)

void swap (int & a, int & b)
{
  int t=a;
  a=b;
  b=t;
}
//...
  int array[10];
  int n = 10;
  int i;
  for (i = 0; i < n; i++)
      array[i] = i;
   
  for (i = n; i > 1; i--)
  { 
      int j = rand() % i;
      swap( array[i-1], array[j] );
  }


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]

QuestionLoop .mp3 playback Pin
Fordfanboi31-Mar-09 4:04
Fordfanboi31-Mar-09 4:04 
AnswerRe: Loop .mp3 playback Pin
led mike31-Mar-09 4:58
led mike31-Mar-09 4:58 
AnswerRe: Loop .mp3 playback Pin
David Crow31-Mar-09 5:03
David Crow31-Mar-09 5:03 
Questiongetting email address in Outlook Express Pin
nikhil3131-Mar-09 3:56
nikhil3131-Mar-09 3:56 
Questionthat is occuring while executingerror Pin
kir_MFC31-Mar-09 3:40
kir_MFC31-Mar-09 3:40 
QuestionRe: that is occuring while executingerror Pin
David Crow31-Mar-09 3:48
David Crow31-Mar-09 3:48 
QuestionCreate Integrated Development Environment (IDE) like VC++ in VC++ 6.0 Pin
kingmax_00731-Mar-09 2:59
kingmax_00731-Mar-09 2:59 
AnswerRe: Create Integrated Development Environment (IDE) like VC++ in VC++ 6.0 Pin
led mike31-Mar-09 5:28
led mike31-Mar-09 5:28 
GeneralRe: Create Integrated Development Environment (IDE) like VC++ in VC++ 6.0 Pin
ThatsAlok31-Mar-09 20:19
ThatsAlok31-Mar-09 20:19 
GeneralRe: Create Integrated Development Environment (IDE) like VC++ in VC++ 6.0 Pin
kingmax_0075-Apr-09 4:18
kingmax_0075-Apr-09 4:18 
AnswerRe: Create Integrated Development Environment (IDE) like VC++ in VC++ 6.0 Pin
ThatsAlok31-Mar-09 20:16
ThatsAlok31-Mar-09 20:16 
QuestionError compiling call to Windows API function. Pin
AlainDev2231-Mar-09 2:56
AlainDev2231-Mar-09 2:56 
AnswerRe: Error compiling call to Windows API function. Pin
Stuart Dootson31-Mar-09 3:11
professionalStuart Dootson31-Mar-09 3:11 
AnswerRe: Error compiling call to Windows API function. Pin
David Crow31-Mar-09 3:17
David Crow31-Mar-09 3:17 
Questionerror that is occuring while executing the project Pin
kir_MFC31-Mar-09 2:54
kir_MFC31-Mar-09 2:54 
AnswerRe: error that is occuring while executing the project Pin
Chandrasekharan P31-Mar-09 3:12
Chandrasekharan P31-Mar-09 3:12 
GeneralRe: error that is occuring while executing the project Pin
kir_MFC31-Mar-09 3:38
kir_MFC31-Mar-09 3:38 

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.