All pastes #451530 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-21 16:40 UTC
rendered paste body
  //Create log name
  char caCreateName[] = "log";
  char caLogName[] = "";
  char *cNumber;
  srand(time(0));
  srand(GetTickCount());
  int iNumber = rand()%255;
  itoa(iNumber, cNumber, 10);
  strcat(caCreateName, cNumber);
  strcat(caCreateName, ".html");
  strcpy(caLogName, caCreateName);
  cout<< "log name" <<endl;
  
  //Get log file path
  char caLogPath[MAX_PATH] = "";
  GetSystemDirectory(caLogPath, sizeof(caLogPath));
  strcat(caLogPath, "\\");
  strcat(caLogPath, caLogName);
  cout<< "log path" <<endl;