thank you.... yes, I had finally figured it out but I can't understand why there would be a version of the function (the 2 parameter one) that is essentially "not very random" - weird!
I have been using srand((unsigned)time(NULL)) at the beginning of main() to seed it and I'm still getting the problem. Here's the code and output:
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
using namespace std;
int main(void)
{...
Hi all, does anybody know why random_shuffle() does not appear to be random at all. I mean, no matter how I try to "seed" random_shuffle() always returns the same results!
Thanks in advance!
Hi, I can create a Tab Control successfully without using MFC - however, I'd like the tabs to be vertical and to the right. I've tried everything it says on MSDN but it's just not working.
Has anybody worked with Tab Controls (without MFC) before? Does anyone know how I can do this?
Thanks
Hi all,
I have been experimenting with the CSocket class and have built a small client program and small server program which I have tested on two separate PCs over an internet connection.
One of the PCs is running Windows XP and the other Windows95. When I set up the client on the XP machine...
How about another ToString() function that works to a precision:
CString CDouble::ToString(int precision)
{
char buffer[20];
_ltoa((long)m_Int,buffer,10);
CString str = buffer;
str += ".";
_ltoa((long)m_Fract,buffer,10);
CString fStr =...
Hi all,
I have a MDI project where I have added a second document/view type. Everything is working great except for one silly thing: the print and print preview menus are disabled and do not work with my second document type.
I've looked through all the code and compared with my original...
Hi all, does anybody know how I can make a selection extend all the way across a CListCtrl in report view. Currently, I can only select an item if I click in the first column. Also, it is only the first column that becomes highlighted when selected.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.