Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Connect to Remote Server Pin
mesajflaviu6-May-10 5:22
mesajflaviu6-May-10 5:22 
GeneralRe: Connect to Remote Server Pin
Moak6-May-10 7:22
Moak6-May-10 7:22 
GeneralRe: Connect to Remote Server [modified] Pin
mesajflaviu6-May-10 5:39
mesajflaviu6-May-10 5:39 
QuestionIs it safe to load dll compiled in Visual studio 2005 into application compiled in the Visual studio 6? Pin
PrafullaShirke275-May-10 19:52
professionalPrafullaShirke275-May-10 19:52 
AnswerRe: Is it safe to load dll compiled in Visual studio 2005 into application compiled in the Visual studio 6? Pin
Xing Chen5-May-10 20:10
Xing Chen5-May-10 20:10 
AnswerRe: Is it safe to load dll compiled in Visual studio 2005 into application compiled in the Visual studio 6? Pin
Rolf Kristensen6-May-10 11:19
Rolf Kristensen6-May-10 11:19 
Questionhow to call srand(time(NULL)); Pin
mrby1235-May-10 18:59
mrby1235-May-10 18:59 
AnswerRe: how to call srand(time(NULL)); Pin
Xing Chen5-May-10 20:12
Xing Chen5-May-10 20:12 
try this:
#include <stdlib.h>
#include <stdio.h>
#include <time.h>

int main( void )
{
   int i;
   
   // Seed the random-number generator with current time so that
   // the numbers will be different every time we run.
   //
   srand( (unsigned)time( NULL ) );

   // Display 10 numbers.
   for( i = 0;   i < 10;i++ )
      printf( "  %6d\n", rand() );

  printf("\n");

  // Usually, you will want to generate a number in a specific range,
  // such as 0 to 100, like this:
  {
     int RANGE_MIN = 0;
     int RANGE_MAX = 100;
     for (i = 0;    i < 10; i++ )
      {
         int rand100 = (((double) rand() / 
                         (double) RAND_MAX) * RANGE_MAX + RANGE_MIN);
         printf( "  %6d\n", rand100);
      }
  }
}

AnswerRe: how to call srand(time(NULL)); [modified] Pin
Peter_in_27805-May-10 20:26
professionalPeter_in_27805-May-10 20:26 
QuestionRe: how to call srand(time(NULL)); Pin
David Crow6-May-10 3:03
David Crow6-May-10 3:03 
GeneralRe: how to call srand(time(NULL)); Pin
mrby1236-May-10 5:42
mrby1236-May-10 5:42 
QuestionHow to convert 8# to 16# ? Pin
wangningyu5-May-10 17:41
wangningyu5-May-10 17:41 
AnswerRe: How to convert 8# to 16# ? Pin
Richard MacCutchan5-May-10 21:38
mveRichard MacCutchan5-May-10 21:38 
QuestionRe: How to convert 8# to 16# ? Pin
David Crow6-May-10 3:08
David Crow6-May-10 3:08 
Questionhow to store a RGB bitmap image in to an 2d byte array and how to display that image from array Pin
sravu255-May-10 16:23
sravu255-May-10 16:23 
AnswerRe: how to store a RGB bitmap image in to an 2d byte array and how to display that image from array Pin
enhzflep5-May-10 17:21
enhzflep5-May-10 17:21 
QuestionRicheditctrl displayed with Selection on Pin
ForNow5-May-10 15:07
ForNow5-May-10 15:07 
AnswerRe: Richeditctrl displayed with Selection on Pin
stebich6-May-10 2:12
professionalstebich6-May-10 2:12 
GeneralRe: Richeditctrl displayed with Selection on Pin
ForNow6-May-10 6:39
ForNow6-May-10 6:39 
Questionbool & BOOL Pin
dipuks5-May-10 12:21
dipuks5-May-10 12:21 
AnswerRe: bool & BOOL Pin
«_Superman_»5-May-10 12:35
professional«_Superman_»5-May-10 12:35 
AnswerRe: bool & BOOL Pin
Stephen Hewitt5-May-10 14:08
Stephen Hewitt5-May-10 14:08 
AnswerRe: BOOL and bool Pin
wangningyu5-May-10 15:25
wangningyu5-May-10 15:25 
Questiondeclare, define, and call of a function passing two dimensional arrays [modified] Pin
mrby1235-May-10 10:26
mrby1235-May-10 10:26 
AnswerRe: declare, define, and call of a function passing two dimensional arrays Pin
«_Superman_»5-May-10 12:12
professional«_Superman_»5-May-10 12:12 

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.