Click here to Skip to main content
15,914,066 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: remove default child window in MDI Pin
Michael Dunn5-Dec-04 13:51
sitebuilderMichael Dunn5-Dec-04 13:51 
GeneralRe: remove default child window in MDI Pin
melliw6-Dec-04 0:17
melliw6-Dec-04 0:17 
GeneralADO Data control Pin
Don125-Dec-04 12:28
Don125-Dec-04 12:28 
GeneralRemoving border around a window Pin
Anonymous5-Dec-04 12:11
Anonymous5-Dec-04 12:11 
GeneralRe: Removing border around a window Pin
David Crow6-Dec-04 2:49
David Crow6-Dec-04 2:49 
Generaladding a icon in the Desktop Pin
Saifur Rahman5-Dec-04 11:52
Saifur Rahman5-Dec-04 11:52 
GeneralRe: adding a icon in the Desktop Pin
alex.barylski5-Dec-04 16:57
alex.barylski5-Dec-04 16:57 
Generalneed help Pin
mikara5-Dec-04 8:18
mikara5-Dec-04 8:18 
I got the program that when its ran it will display 10 lotto numbers. However i raninto a problem, everytime i run it i get numbers that are the same in the draw. Can anyone give me some advice or help on how i can prevent that from happening. Can i do FOR statement to reset all to 0 or set array to 0? how would i go doing that? I included the program below.


//sp
//11/30/04

#include <iostream>

using namespace std;

#include <iomanip>


using std::setw;


#include <cstdlib>
#include <ctime>

int main()
{
const int size = 6;
int a[size] = {0,0,0,0,0,0};
srand(time(0));


for(int w=1; w<11;w++){
cout <<"For game #"<< setw(3) << w << "=";

for(int i=0;i<size;i++){
a[i] = rand()%59 + 1;
cout << setw(5) << a[i] <<" ";
}
cout <<endl;
}
cout <<endl;
return 0;
}
Smile | :)
GeneralRe: need help Pin
Gary R. Wheeler5-Dec-04 10:01
Gary R. Wheeler5-Dec-04 10:01 
GeneralRe: need help Pin
mikara5-Dec-04 11:58
mikara5-Dec-04 11:58 
GeneralRe: need help Pin
Michael Dunn5-Dec-04 13:58
sitebuilderMichael Dunn5-Dec-04 13:58 
GeneralRe: need help Pin
namaskaaram5-Dec-04 16:30
namaskaaram5-Dec-04 16:30 
GeneralRe: need help Pin
David Crow6-Dec-04 2:53
David Crow6-Dec-04 2:53 
GeneralNetWork Pin
gamitech5-Dec-04 6:51
gamitech5-Dec-04 6:51 
GeneralRe: NetWork Pin
Graham Bradshaw5-Dec-04 9:35
Graham Bradshaw5-Dec-04 9:35 
GeneralRe: NetWork Pin
gamitech6-Dec-04 2:22
gamitech6-Dec-04 2:22 
Generalrichedit classes and pressing keys Pin
Anonymous5-Dec-04 6:23
Anonymous5-Dec-04 6:23 
GeneralRe: richedit classes and pressing keys Pin
Vancouver5-Dec-04 13:03
Vancouver5-Dec-04 13:03 
GeneralEthernet Adapter Parmas Pin
skringel5-Dec-04 1:17
skringel5-Dec-04 1:17 
GeneralHtml help files Pin
includeh104-Dec-04 18:48
includeh104-Dec-04 18:48 
GeneralRe: Html help files Pin
digwizfox5-Dec-04 7:56
digwizfox5-Dec-04 7:56 
GeneralRe: Html help files Pin
includeh106-Dec-04 10:07
includeh106-Dec-04 10:07 
GeneralSelecting Region of Interest(ROI) in images Pin
ashsri4-Dec-04 16:06
ashsri4-Dec-04 16:06 
GeneralRe: Selecting Region of Interest(ROI) in images [modified] Pin
qilujo20-Jul-09 2:13
qilujo20-Jul-09 2:13 
Generalvc60.pdb Pin
Andy H4-Dec-04 11:14
Andy H4-Dec-04 11:14 

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.