Click here to Skip to main content

C / C++ / MFC

 
QuestionWinHttpClient code Pinmemberel_tel17-Feb-13 2:21 
AnswerRe: WinHttpClient code PinmvpRichard MacCutchan17-Feb-13 3:41 
GeneralRe: WinHttpClient code Pinmemberel_tel17-Feb-13 3:43 
QuestionCSplitter and CTabCtrl - looking for ideas PinmemberVaclav_Sal16-Feb-13 6:53 
Questioncalculator Pinmemberabhi sharma15-Feb-13 22:45 
AnswerRe: calculator PinmemberJibesh15-Feb-13 23:03 
AnswerRe: calculator Pinmember ProgramFOX17-Feb-13 5:42 
AnswerRe: calculator Pinmember庄伟东17-Feb-13 16:30 
QuestionHo to add auto scroll feature on Dialog box? PingroupVCProgrammer15-Feb-13 21:11 
AnswerRe: Ho to add auto scroll feature on Dialog box? PinmvpRichard MacCutchan15-Feb-13 23:21 
GeneralRe: Ho to add auto scroll feature on Dialog box? PingroupVCProgrammer17-Feb-13 18:30 
AnswerRe: Ho to add auto scroll feature on Dialog box? [modified] PinmemberFlaviu217-Feb-13 20:54 
QuestionClient Certificates in WinHTTP Pinmemberbasementman15-Feb-13 10:27 
QuestionPossible to resolve the question ... in a short time PinmemberHaiathem alhmoud15-Feb-13 8:48 
) If two dice are rolled. what is the probability of getting (1, 2), or (2, 3) and so on. We can answer
these questions analytically, but you need to write a code to verify the results. You can do that
following the steps:
a. Write a function rollDices that takes two parameters as output parameters (return values through
them). The function when called should return two random integers, each one between 1 and 6,
where each one represent the value of a rolled die.
Use the following code to generate a random number between a and b. We seed the random
number generator using srand function as shown below.#include
#include
using namespace std;
//... you other functions ...
int main () {
// seed random number generator
srand ( time(NULL) );
// your other code here
// generate a random number between 1 and 10
int randomNumber = rand() % 10 + 1;
}
b. Write another function rollProb that takes a two dimensional array 6x6 and an integer
numberOfRolls. The function should call the rollDices function numberOfRolls times, and for
each call it should increment the corresponding cell in the array.
c. Your main program should prompt the user for the numberOfRolls and calls the function rollProb
and then prints the probability of obtaining each pair of values. Try it with 4 different number of
rolls: 100, 1000, 10000, 100000. I will explain it more in class.
AnswerRe: Possible to resolve the question ... in a short time Pinmemberjeron115-Feb-13 9:08 
AnswerRe: Possible to resolve the question ... in a short time PinmemberDavidCrow16-Feb-13 15:56 
QuestionWindows 8 Modified Windows API List... PinmemberBlake Miller15-Feb-13 8:35 
AnswerRe: Windows 8 Modified Windows API List... PinmvpRichard MacCutchan15-Feb-13 23:18 
Question_IID_IXMLHTTPRequest linker error PinmemberMember 981141114-Feb-13 20:48 
AnswerRe: _IID_IXMLHTTPRequest linker error PinmvpRichard MacCutchan15-Feb-13 0:09 
AnswerRe: _IID_IXMLHTTPRequest linker error PinmemberDavidCrow15-Feb-13 6:31 
QuestionMCF PingroupFranksLIC14-Feb-13 11:55 
AnswerRe: MCF PinmemberJibesh14-Feb-13 12:12 
AnswerRe: MCF Pinmemberjeron114-Feb-13 13:01 
AnswerRe: MCF PinmemberMaximilien15-Feb-13 2:20 
AnswerRe: MCF PinmemberSCProrammer15-Feb-13 6:56 
QuestionHosting .net window in MFC dialog PinmemberYunaless14-Feb-13 5:06 
QuestionCView::OnDraw - related question Pinmembertagopi13-Feb-13 23:29 
AnswerRe: CView::OnDraw - related question PinmemberSivaraman Dhamodharan14-Feb-13 0:26 
GeneralRe: CView::OnDraw - related question Pinmembertagopi14-Feb-13 0:40 
SuggestionRe: CView::OnDraw - related question PinmvpRichard MacCutchan14-Feb-13 0:51 
GeneralRe: CView::OnDraw - related question Pinmembertagopi14-Feb-13 1:14 
GeneralRe: CView::OnDraw - related question PinmvpRichard MacCutchan14-Feb-13 1:41 
GeneralRe: CView::OnDraw - related question Pinmembertagopi14-Feb-13 2:33 
GeneralRe: CView::OnDraw - related question PinmvpRichard MacCutchan14-Feb-13 2:41 
AnswerRe: CView::OnDraw - related question PinmemberAndrew Cherednik14-Feb-13 14:26 
QuestionVisual Studio Display Thread question PinmemberForNow13-Feb-13 22:53 
AnswerRe: Visual Studio Display Thread question PinmvpRichard MacCutchan13-Feb-13 23:26 
GeneralRe: Visual Studio Display Thread question PinmemberForNow14-Feb-13 4:15 
AnswerRe: Visual Studio Display Thread question PinmemberAlbert Holguin14-Feb-13 5:07 
AnswerRe: Visual Studio Display Thread question PinmemberDavidCrow14-Feb-13 6:23 
GeneralRe: Visual Studio Display Thread question PinmemberForNow14-Feb-13 8:08 
Question................ [modified] PinmemberMember 981141113-Feb-13 20:21 
AnswerRe: upload data using xmlhttp( need an urgent help) PinmvpRichard MacCutchan13-Feb-13 23:25 
AnswerMessage Removed PinmemberMember 981141114-Feb-13 1:34 
GeneralRe: upload data using xmlhttp( need an urgent help) PinmvpRichard MacCutchan14-Feb-13 1:47 
GeneralMessage Removed PinmemberMember 981141114-Feb-13 19:33 
GeneralRe: upload data using xmlhttp( need an urgent help) PinmvpRichard MacCutchan14-Feb-13 23:52 
GeneralMessage Removed PinmemberMember 981141115-Feb-13 19:30 
GeneralRe: upload data using xmlhttp( need an urgent help) PinmvpRichard MacCutchan15-Feb-13 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web04 | 2.8.150128.1 | Last Updated 29 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid