Then I have these 3 functions:
C++ Syntax (Toggle Plain Text)

Code:
  1.
      void getCatArrAndVals (char* arg[])
   2.
      {
   3.
      //do something
   4.
      }
   5.
       
   6.
      char * LoadCategory()
   7.
      {
   8.
      srand( time(NULL) );
   9.
      int RandIndex = rand() % 3;
  10.
      theCategory=arrCats[RandIndex]; //category I'm interested in
  11.
      getCatArrAndVals(colors); //I'm passing the hard-coded value of "colors" array
  12.
      //here but I really want to pass theCategory
  13.
      return theCategory;
  14.
      }
  15.
       
  16.
      void AppMain()
  17.
      {
  18.
      LoadCategory();


Sponsored Links