Click here to Skip to main content
12,301,965 members (55,616 online)

C / C++ / MFC

 
GeneralRe: DialogBox 64bit ? Pin
Richard MacCutchan26-Sep-12 6:29
mvpRichard MacCutchan26-Sep-12 6:29 
GeneralRe: DialogBox 64bit ? Pin
Smart Arab26-Sep-12 22:42
memberSmart Arab26-Sep-12 22:42 
GeneralRe: DialogBox 64bit ? Pin
CPallini26-Sep-12 11:47
mvpCPallini26-Sep-12 11:47 
GeneralRe: DialogBox 64bit ? Pin
Smart Arab26-Sep-12 22:39
memberSmart Arab26-Sep-12 22:39 
GeneralRe: DialogBox 64bit ? Pin
CPallini26-Sep-12 22:45
mvpCPallini26-Sep-12 22:45 
QuestionHow to make slider movement smooth in MFC.? Pin
mbatra3125-Sep-12 20:39
membermbatra3125-Sep-12 20:39 
QuestionRandom Number Pin
pix_programmer25-Sep-12 20:05
memberpix_programmer25-Sep-12 20:05 
AnswerRe: Random Number Pin
ihoecken25-Sep-12 20:38
memberihoecken25-Sep-12 20:38 
AnswerRe: Random Number Pin
CPallini25-Sep-12 22:25
mvpCPallini25-Sep-12 22:25 
AnswerRe: Random Number Pin
ihoecken25-Sep-12 23:55
memberihoecken25-Sep-12 23:55 
GeneralRe: Random Number Pin
CPallini26-Sep-12 0:28
mvpCPallini26-Sep-12 0:28 
GeneralRe: Random Number Pin
ihoecken26-Sep-12 0:35
memberihoecken26-Sep-12 0:35 
AnswerRe: Random Number Pin
_AnsHUMAN_ 26-Sep-12 0:12
group_AnsHUMAN_ 26-Sep-12 0:12 
AnswerRe: Random Number Pin
Clark Kent SuperCoder26-Sep-12 8:00
memberClark Kent SuperCoder26-Sep-12 8:00 
The code is as follows : int random_number = (rand() % 6) + 1;


Example of use:


#include <cstdlib>
#include <ctime>
#include <iostream>
using namespace std ;
 

 
int main(void)
{   //seed
    srand(static_cast<unsigned>(time(0)));
 

    cout<<" \nDICE GAME\n";
 
    //Generate a random number between 1 and 6
    int random_number = (rand() % 6) + 1;
 
    cout<<" \nYou threw a ["<<random_number <<"]\n\n";
 

   return 0;
} 

AnswerOT Just curious... Pin
jeron126-Sep-12 8:21
memberjeron126-Sep-12 8:21 
QuestionRe: OT Just curious... Pin
DavidCrow26-Sep-12 10:52
memberDavidCrow26-Sep-12 10:52 
AnswerRe: OT Just curious... Pin
CPallini26-Sep-12 10:55
mvpCPallini26-Sep-12 10:55 
GeneralRe: OT Just curious... Pin
jeron126-Sep-12 11:02
memberjeron126-Sep-12 11:02 
GeneralRe: OT Just curious... Pin
CPallini26-Sep-12 11:14
mvpCPallini26-Sep-12 11:14 
GeneralRe: OT Just curious... Pin
jeron126-Sep-12 12:15
memberjeron126-Sep-12 12:15 
Questionproblem deploying application Pin
sujandasmahapatra25-Sep-12 8:40
membersujandasmahapatra25-Sep-12 8:40 
AnswerRe: problem deploying application Pin
Chris Meech25-Sep-12 9:00
memberChris Meech25-Sep-12 9:00 
GeneralRe: problem deploying application Pin
sujandasmahapatra25-Sep-12 21:28
membersujandasmahapatra25-Sep-12 21:28 
GeneralRe: problem deploying application Pin
Richard MacCutchan25-Sep-12 22:00
mvpRichard MacCutchan25-Sep-12 22:00 
GeneralRe: problem deploying application Pin
sujandasmahapatra26-Sep-12 21:02
membersujandasmahapatra26-Sep-12 21:02 
GeneralRe: problem deploying application Pin
Richard MacCutchan26-Sep-12 21:29
mvpRichard MacCutchan26-Sep-12 21:29 
Questionexceptions always SIGABRT in linux shared object Pin
MichaelRoop25-Sep-12 1:28
memberMichaelRoop25-Sep-12 1:28 
AnswerRe: exceptions always SIGABRT in linux shared object Pin
Richard MacCutchan25-Sep-12 6:04
mvpRichard MacCutchan25-Sep-12 6:04 
GeneralRe: exceptions always SIGABRT in linux shared object Pin
MichaelRoop25-Sep-12 11:02
memberMichaelRoop25-Sep-12 11:02 
GeneralRe: exceptions always SIGABRT in linux shared object Pin
MichaelRoop25-Sep-12 13:45
memberMichaelRoop25-Sep-12 13:45 
QuestionCppunit in Visual studio 2010 Pin
Rahul from Poona24-Sep-12 4:44
memberRahul from Poona24-Sep-12 4:44 
AnswerRe: Cppunit in Visual studio 2010 Pin
Chris Meech24-Sep-12 5:56
memberChris Meech24-Sep-12 5:56 
AnswerRe: Cppunit in Visual studio 2010 Pin
Albert Holguin24-Sep-12 6:43
memberAlbert Holguin24-Sep-12 6:43 
AnswerRe: Cppunit in Visual studio 2010 Pin
jschell24-Sep-12 12:39
memberjschell24-Sep-12 12:39 
QuestionLate Binding Concept Pin
AmbiguousName23-Sep-12 20:30
memberAmbiguousName23-Sep-12 20:30 
AnswerRe: Late Binding Concept Pin
CPallini23-Sep-12 22:27
mvpCPallini23-Sep-12 22:27 
AnswerRe: Late Binding Concept Pin
Richard MacCutchan23-Sep-12 23:05
mvpRichard MacCutchan23-Sep-12 23:05 
QuestionRe: Late Binding Concept Pin
CPallini23-Sep-12 23:58
mvpCPallini23-Sep-12 23:58 
AnswerRe: Late Binding Concept Pin
Richard MacCutchan24-Sep-12 0:11
mvpRichard MacCutchan24-Sep-12 0:11 
AnswerRe: Late Binding Concept Pin
Richard MacCutchan23-Sep-12 23:09
mvpRichard MacCutchan23-Sep-12 23:09 
AnswerRe: Late Binding Concept PinPopular
pasztorpisti24-Sep-12 1:09
memberpasztorpisti24-Sep-12 1:09 
GeneralRe: Late Binding Concept Pin
CPallini24-Sep-12 1:41
mvpCPallini24-Sep-12 1:41 
GeneralRe: Late Binding Concept Pin
pasztorpisti24-Sep-12 1:46
memberpasztorpisti24-Sep-12 1:46 
GeneralRe: Late Binding Concept Pin
Chris Meech24-Sep-12 2:19
memberChris Meech24-Sep-12 2:19 
GeneralRe: Late Binding Concept Pin
pasztorpisti24-Sep-12 2:37
memberpasztorpisti24-Sep-12 2:37 
AnswerRe: Late Binding Concept Pin
Chuck O'Toole24-Sep-12 5:16
memberChuck O'Toole24-Sep-12 5:16 
GeneralRe: Late Binding Concept Pin
pasztorpisti24-Sep-12 6:00
memberpasztorpisti24-Sep-12 6:00 
GeneralRe: Late Binding Concept Pin
pasztorpisti24-Sep-12 6:19
memberpasztorpisti24-Sep-12 6:19 
GeneralRe: Late Binding Concept Pin
Chuck O'Toole24-Sep-12 7:53
memberChuck O'Toole24-Sep-12 7:53 
QuestionCallBack Function Pin
Smart Arab23-Sep-12 4:47
memberSmart Arab23-Sep-12 4:47 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.160530.1 | Last Updated 30 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid