]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdRandomString.cxx
Clean code
[bbtk.git] / packages / std / src / bbstdRandomString.cxx
index c9d9ac389d99430b5bb4e5e15ffdb73105fbbcfc..5ccee71003d6702c17086390d28a3b03238fe028 100644 (file)
@@ -3,6 +3,8 @@
 //===== 
 #include "bbstdRandomString.h"
 #include "bbstdPackage.h"
+#include "time.h"
+
 namespace bbstd
 {
 
@@ -19,11 +21,11 @@ static const char alphanum[] =
 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 "abcdefghijklmnopqrstuvwxyz";
 
-
+/*
 char genRandom()
 {
 }
-
+*/
 
 void RandomString::Process()
 {
@@ -43,14 +45,14 @@ void RandomString::Process()
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
     int stringLength = sizeof(alphanum) - 1;
-    srand(time(0));
+    srand(time(NULL));
     std::string STR;
     for(unsigned int i = 0; i < 8; ++i)
     {
            STR += alphanum[rand() % stringLength];
     }
         bbSetOutputOut( STR );
-printf("EED RandomString::Process randomString=%s\n",STR.c_str());
+//printf("EED RandomString::Process randomString=%s\n",STR.c_str());
 }
 
 //=====