I have an array of randomly distributed numbers. and at the end it has say 3 zeros . I want to shuffle this array how do I do it. Thankx
Type: Posts; User: ypramesh
I have an array of randomly distributed numbers. and at the end it has say 3 zeros . I want to shuffle this array how do I do it. Thankx
I have written a function to fillin a array with random numbers within a given range, say 1-16. any of the empty elments (dim*dim - need_num) should have the value 0 in them. The way I have written...
its printing to the file after i put fclose at the end of logfile. but in my actual code i have repeated calls to logfile. but only the last one get prited in the file. So it's deleting the previous...
fptr=fopen("C:\\IN.txt","w");
fprintf(fptr,"& START");
int fclose(FILE *fptr);
will that work?? Thankx
thanx for reply. Microsoft?? nah I am just tired and trying blame the big guy. i am sure i messed up somthing
Microsoft.
Btw Thankx For The Reply. Any Help Would Be Great
THIS IS WEIRED it worked in DEV c++ as you said. But MS VISUAL STUDIO JUST CREAT THE FOLDER BUT DIDN'T PRINT ANYTHING> I WONDER IF THERE IS A SPECIFIC WAY I should do this in MS C++
when I compile the following code in Dev c++ it prints correct to the file. But when I run it in MS Visual c++6.0 it creates the folder but does not prints anything to the folder why is this. I have...
thankx so much for that advice it save me lot of time. again thanx a lot
hmm.. I donno does it have to do somthing with all array elements are not assigned a value??? I am lost pls help
I have the following code. the temp_array seems to have some garbage value at the end even though i try to randomly distubute certain numbers to it. I went through the loop several times but couldn't...
in the program i am doing i need to give the option to the user for exiting the program totally at certain points in the game, i was wondering if anybody could help me out with writing the code for...
is there any other ways to tackle this prob?
thanx so much for taking time to reply
thats true i get that part. but if rand repeats then we will put two numbers in a one spot?? sorry i am doing it lab now and its driving me crazy
that rand function will give some repeating numbers. lets say I have 1-100 and i want to use rand to pick numbers randomley but it doesn't work because it will repeat some numbers with in 1-100. this...
sorry I am totaly lost didn't get what you said.
I am doing a hw assignment which is a puzzle game and i came to this problem.
I have a 2d array and i have a set of numbers lets say (ex:1-100)
I need to place these numbers randomely in the array....
Thanx for the help.
but it gives me some errors
error C2059: syntax error : '*'
for that line
I (dynamically) allocated memory for a 2D array. I realize that I must declare the 2nd dimension above the main function, but I do NOT know the value of this second dimension.
ex.
void...
I am trying to generate random numbers to fill in a 2-D array but they can not repeat within the array
for example I have a 10*10 array and i want to fill array with 1-100 randomly, without...