⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fortune1.cpp

📁 VC++串口通信设。本书详细说明讲解了在VC++环境下编写串口通信得过程。值得一看
💻 CPP
字号:
// Get needed include files
#include "Fortune1.h"
#include "Utility.h"

// Our list of fortunes
static string g_astrFortunes[] = 
   { 
      "You are strong in body and spirit.",
      "You are strong in perspiration and odor.",
      "Good fortune smiles upon the distributed.",
      "VB Programmer for Hire -- Cheap!!",
      "I never met an object I didn't like.",
      "Edit, Compile, Link, Crash, Sigh.",
      "Never judge a stack dump by its arguments.",
      "Card carrying member of the Bug Police.",
      "You make Dilbert look charming and sophisticated.",
      "BMW, The Ultimate Driving Machine."
   };

// Constant that tracks the number of fortunes we know about
static const ULONG g_ulNumFortunes = 
   sizeof(g_astrFortunes) / sizeof(string);

// Constructor
CFortuneTeller::CFortuneTeller()
{
  // Seed the random number generator
  SeedRandomGenerator();
}

// Lone public method
string CFortuneTeller::GetFortune()
{
  return g_astrFortunes[rand() % g_ulNumFortunes];
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -