在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

C/C++項(xiàng)目實(shí)戰(zhàn)分享

C語言編程學(xué)習(xí)基地 ? 來源:C語言編程學(xué)習(xí)基地 ? 2023-01-14 14:41 ? 次閱讀

每天一個(gè)C語言小項(xiàng)目,提升你的編程能力!

這是經(jīng)典的下 100 層游戲。>_<

通過鼠標(biāo)左右鍵或者鍵盤 A、D 按鍵及左右方向鍵控制小球左右移動(dòng),木板會(huì)不斷上升,小球到底認(rèn)定游戲結(jié)束,按下鍵盤后小球會(huì)加速到一個(gè)最大速度,小球在木板上則會(huì)跟著木板上移,達(dá)到一定分?jǐn)?shù)啟動(dòng)反向操作。

本程序采用單例設(shè)計(jì)模式,RollingBall 公有繼承 BallAndPlank,protected 便于派生類訪問基類數(shù)據(jù)成員。

木板的顏色隨機(jī),位置隨機(jī)。

界面由初始化界面大小控制,可自行更改。

簡(jiǎn)單了解游戲后我們就來試試吧?。ㄖ苯由显创a,大家可以看注釋)

代碼展示:

/*
  項(xiàng)目名稱:
    RollingBall
  作者:
    [email protected] 
  項(xiàng)目介紹:
    本程序由單例設(shè)計(jì)模式 RollingBall 公有繼承 BallAndPlank
    protected 便于派生類訪問基類數(shù)據(jù)成員
    模板顏色隨機(jī),位置隨機(jī)
    界面由初始化界面大小控制,初學(xué)者可自行更改
  版權(quán)聲明:
    本程序完全由作者所創(chuàng),不涉及任何侵權(quán)行為,僅用于學(xué)習(xí)
*/


// 頭文件
#include 
#include 
#include 






// 全局變量
const COLORREF BKCOLOR = BLACK;                              // 繪圖窗口背景顏色
const int max_x = 640;                                  // 繪圖窗口像素寬度
const int max_y = 480;                                  // 繪圖窗口像素高度
const int max_smx = GetSystemMetrics(SM_CXSCREEN);                    // 電腦屏幕像素寬度
const int max_smy = GetSystemMetrics(SM_CYSCREEN);                    // 電腦屏幕像素高度
const int inverse_operate_score = 600;                          // 反向操作啟動(dòng)分?jǐn)?shù)
static IMAGE img_start(80, 40), id_start(80, 40), img_exit(80, 40), id_exit(80, 40);  // 用于按鈕效果的 IMAGE






////////////////////////////////////////////////////
// 小球和木板類
class BallAndPlank
{
  //小球結(jié)構(gòu)體
  typedef struct BALL
  {
    int ball_x;            // 小球球心位置 x
    int ball_y;            // 小球球心位置 y
  }Ball;


  //木板結(jié)構(gòu)體
  typedef struct PLANK
  {
    int plank_x;          // 木板左端位置 x
    int plank_y;          // 木板位置 y
    int plank_len;          // 木板長度
    COLORREF plank_color;      // 木板顏色
    int thorn_x;          // 尖刺左端位置 x
    bool is_thorn;          // 木板是否有尖刺
  }Plank;


public:
  // 構(gòu)造函數(shù)初始化參數(shù)
  BallAndPlank()
  {
    // 小球
    ball_r = 4;
    ball_ddx = 1;
    ball_dx_min = 0;
    ball_dx_max = 8;
    left_right = STOP;
    ball_dx = ball_dx_min;
    ball_dy = ball_dx_min;
    ball_color = RGB(255, 0, 0);


    // 木板
    plank_dy = 1;
    plank_len_min = 50;
    plank_len_max = 150;
    thorn_len = 32;
    thorn_h = 4;
    plank_gap = (max_y - 1) / plank_num;
  }


  ~BallAndPlank()
  {
    // 未定義
  }


  // 小球顏色繪制小球
  void DrawBall(int x, int y)
  {
    setfillcolor(ball_color);
    solidcircle(x, y, ball_r);
  }


  // 背景顏色清除小球
  void CleanBall(int x, int y)
  {
    setfillcolor(BKCOLOR);
    solidcircle(x, y, ball_r);
  }


  bool IsThorn()
  {
    return (rand() % 1000 > 600) ? true : false;
  }


  // 木板顏色繪制木板
  void DrawPlank()
  {
    for (int i = 0; i < plank_num; i++)
    {
      setlinecolor(plank[i].plank_color);
      line(plank[i].plank_x, plank[i].plank_y, plank[i].plank_x + plank[i].plank_len, plank[i].plank_y);
      if (plank[i].is_thorn == true)
      {
        for (int j = plank[i].thorn_x; j < plank[i].thorn_x + thorn_len; j += 2 * thorn_h)
        {
          line(j, plank[i].plank_y, j + thorn_h, plank[i].plank_y - thorn_h - 1);
          line(j + thorn_h, plank[i].plank_y - thorn_h - 1, j + 2 * thorn_h, plank[i].plank_y);
        }
      }
    }
  }


  // 背景顏色清除木板
  void CleanPlank()
  {
    setlinecolor(BKCOLOR);
    for (int i = 0; i < plank_num; i++)
    {
      line(plank[i].plank_x, plank[i].plank_y, plank[i].plank_x + plank[i].plank_len, plank[i].plank_y);
      if (plank[i].is_thorn == true)
      {
        for (int j = plank[i].thorn_x; j < plank[i].thorn_x + thorn_len; j += 2 * thorn_h)
        {
          line(j, plank[i].plank_y, j + thorn_h, plank[i].plank_y - thorn_h - 1);
          line(j + thorn_h, plank[i].plank_y - thorn_h - 1, j + 2 * thorn_h, plank[i].plank_y);
        }
      }
    }
  }


protected:                        // 保護(hù)用于派生類訪問數(shù)據(jù)成員
  // 小球?qū)傩?  enum Left_Right { STOP, LEFT, RIGHT };        // 枚舉小球左右方向
  int ball_r;                      // 小球半徑
  int ball_ddx;                    // 可視為小球加速度
  int ball_dx_min;                  // 小球 x 方向最小步長
  int ball_dx_max;                  // 小球 x 方向最大步長
  int left_right;                    // 小球左右方向
  int ball_dx;                    // 可視為小球 x 方向速度
  int ball_dy;                    // 可視為小球 y 方向速度
  COLORREF ball_color;                // 小球顏色
  Ball ball;                      // 小球結(jié)構(gòu)對(duì)象


  // 木板屬性
  enum Plank_Num { plank_num = 7 };          // 枚舉初始化木板數(shù)量
  int plank_dy;                    // 可視為木板速度
  int plank_len_min;                  // 木板最小長度
  int plank_len_max;                  // 木板最大長度
  int plank_gap;                    // 木板間隔
  int thorn_len;                    // 尖刺長度
  int thorn_h;                    // 尖刺高度
  Plank plank[plank_num];                // 木板結(jié)構(gòu)對(duì)象數(shù)組
};






////////////////////////////////////////////////////
// 單例設(shè)計(jì)模式 RollingBall派生類
class RollingBall : public BallAndPlank
{
public:
  ~RollingBall()
  {
    // 未定義
  }


  // 獲取單例指針
  static RollingBall *GetInstance()
  {
    static RollingBall RB;
    return &RB;
  }


  // 開始前介紹界面
  void Introduce()
  {
    setbkcolor(BKCOLOR);
    cleardevice();
    settextcolor(LIGHTMAGENTA);
    settextstyle(50, 0, _T("黑體"));
    outtextxy((max_x - textwidth(_T("RollingBall"))) / 2, max_y / 5, _T("RollingBall"));
    settextcolor(GREEN);
    settextstyle(25, 0, _T("黑體"));
    outtextxy((max_x - textwidth(_T("ESC退出,空格暫停"))) / 2, max_y / 5 * 2 + 20, _T("ESC退出,空格暫停"));
    outtextxy((max_x - textwidth(_T("控制方向:左右方向鍵,AD,鼠標(biāo)左右鍵"))) / 2, max_y / 5 * 2 + 60, _T("控制方向:左右方向鍵,AD,鼠標(biāo)左右鍵"));


    SetWorkingImage(&img_start);
    setbkcolor(LIGHTGRAY);
    cleardevice();
    settextcolor(BROWN);
    settextstyle(25, 0, _T("黑體"));
    outtextxy((80 - textwidth(_T("開始"))) / 2, (40 - textheight(_T("開始"))) / 2, _T("開始"));


    SetWorkingImage(&id_start);
    setbkcolor(DARKGRAY);
    cleardevice();
    settextcolor(BROWN);
    settextstyle(25, 0, _T("黑體"));
    outtextxy((80 - textwidth(_T("開始"))) / 2, (40 - textheight(_T("開始"))) / 2, _T("開始"));


    SetWorkingImage(&img_exit);
    setbkcolor(LIGHTGRAY);
    cleardevice();
    settextcolor(BROWN);
    settextstyle(25, 0, _T("黑體"));
    outtextxy((80 - textwidth(_T("退出"))) / 2, (40 - textheight(_T("退出"))) / 2, _T("退出"));


    SetWorkingImage(&id_exit);
    setbkcolor(DARKGRAY);
    cleardevice();
    settextcolor(BROWN);
    settextstyle(25, 0, _T("黑體"));
    outtextxy((80 - textwidth(_T("退出"))) / 2, (40 - textheight(_T("退出"))) / 2, _T("退出"));


    SetWorkingImage();
    int yy = max_y / 4 * 3;
    int exit_x = max_x / 2 - 200;
    int start_x = max_x / 2 + 120;
    putimage(start_x, yy, &img_start);
    putimage(exit_x, yy, &img_exit);


    // 檢測(cè)是否點(diǎn)擊相關(guān)按鈕及按鍵
    MOUSEMSG msg;
    bool selected = false;
    while (!selected)
    {
      while (MouseHit())
      {
        msg = GetMouseMsg();


        if ((msg.x >= start_x && msg.x <= start_x + 80 && msg.y >= yy && msg.y <= yy + 40 && msg.uMsg == WM_LBUTTONDOWN) || GetAsyncKeyState(VK_RETURN) & 0x8000)
        {
          putimage(start_x, yy, &id_start);
          Sleep(200);
          putimage(start_x, yy, &img_start);
          Sleep(100);
          selected = true;
          break;
        }
        else if ((msg.x >= exit_x && msg.x <= exit_x + 80 && msg.y >= yy && msg.y <= yy + 40 && msg.uMsg == WM_LBUTTONDOWN) || GetAsyncKeyState(VK_ESCAPE) & 0x8000)
        {
          putimage(exit_x, yy, &id_exit);
          Sleep(200);
          putimage(exit_x, yy, &img_exit);
          Sleep(100);
          exit(0);
        }
      }


      Sleep(16);
    }
  }


  // 初始化游戲界面
  void Initialize()
  {
    setbkcolor(BKCOLOR);
    cleardevice();
    setlinecolor(DARKGRAY);
    line(0, 0, 0, max_y - 1);
    line(max_y, 0, max_y, max_y - 1);
    line(0, 0, max_y - 1, 0);
    line(0, max_y - 1, max_y - 1, max_y - 1);


    for (int i = 0; i < max_y; i += 2 * die_top)
    {
      line(i, 0, i + die_top, die_top);
      line(i + die_top, die_top, i + 2 * die_top, 0);
    }


    for (int i = 0; i < plank_num; i++)
    {
      plank[i].plank_y = (i + 1) * plank_gap;
      plank[i].plank_len = rand() % (plank_len_max - plank_len_min) + plank_len_min + 1;
      plank[i].plank_x = rand() % (max_y - plank[i].plank_len);
      plank[i].plank_color = HSVtoRGB(float(rand() % 360), float(1.0), float(1.0));
      plank[i].is_thorn = IsThorn();
      if (plank[i].is_thorn == true)
        plank[i].thorn_x = plank[i].plank_x + rand() % (plank[i].plank_len - thorn_len);
    }


    plank[3].is_thorn = false;
    ball.ball_x = plank[3].plank_x + plank[3].plank_len / 2;
    ball.ball_y = plank[3].plank_y - 1 - ball_r;
    DrawBall(ball.ball_x, ball.ball_y);
    DrawPlank();
    Sleep(sleep_time);
  }


  // 檢測(cè)是否死亡
  bool IsDead()
  {
    if (ball.ball_y <= die_top + ball_r || ball.ball_y >= max_y - 1 - ball_r || is_dead)
    {
      is_dead = true;
      return true;
    }
    else
      return false;
  }


  // 打印分?jǐn)?shù),速度及是否開啟反向操作
  void PrintScore()
  {
    settextcolor(RED);
    settextstyle(16, 0, _T("黑體"));
    score = time_num / 5;
    TCHAR str[20];
    _stprintf_s(str, _T("當(dāng)前得分: %d"), score);
    outtextxy(max_y + 5, max_y / 6 * 5 + 10, str);


    if    (score < 50)  plank_dy = 1;
    else if (score < 200)  plank_dy = 2;
    else if (score < 500)  plank_dy = 3;
    else if (score < 1000)  plank_dy = 4;
    else if (score < 1500)  plank_dy = 5;
    else          plank_dy = 6;


    _stprintf_s(str, _T("當(dāng)前速度: %d/6"), plank_dy);
    outtextxy(max_y + 5, max_y / 2 - 10, str);
    if (score > inverse_operate_score)
      outtextxy(max_y + 5, max_y / 11, _T("反向操作 已開啟"));
    else
      outtextxy(max_y + 5, max_y / 11, _T("反向操作 未開啟"));
  }


  // 非ESC結(jié)束時(shí)顯示最終分?jǐn)?shù)
  void Finish()
  {
    if (is_dead)
    {
      TCHAR str[50];
      _stprintf_s(str, _T("	     您的最終得分為: %d		"), score);
      MessageBox(GetHWnd(), str, _T("游戲結(jié)束"), MB_OK);
    }
  }


  // 游戲運(yùn)行處理
  void GameRunning()
  {
    // 清除小球和木板
    CleanBall(ball.ball_x, ball.ball_y);
    CleanPlank();


    // 計(jì)算木板位置
    for (int i = 0; i < plank_num; i++)
      plank[i].plank_y -= plank_dy;


    // 頂木板是否消失,是 則生成尾木板
    if (plank[0].plank_y < die_top + ball_r + 1)
    {
      for (int i = 0; i < plank_num - 1; i++)
        plank[i] = plank[i + 1];
      plank[plank_num - 1].plank_y = (plank_num)* plank_gap;
      plank[plank_num - 1].plank_len = rand() % (plank_len_max - plank_len_min) + plank_len_min + 1;
      plank[plank_num - 1].plank_x = rand() % (max_y - plank[plank_num - 1].plank_len);
      plank[plank_num - 1].plank_color = HSVtoRGB(float(rand() % 360), float(1.0), float(1.0));
      plank[plank_num - 1].is_thorn = IsThorn();
      if (plank[plank_num - 1].is_thorn == true)
        plank[plank_num - 1].thorn_x = plank[plank_num - 1].plank_x + rand() % (plank[plank_num - 1].plank_len - thorn_len);
    }


    // 計(jì)算小球球心 x 位置(加減速效果)
    if ((GetAsyncKeyState(VK_LEFT) & 0x8000) || (GetAsyncKeyState('A') & 0x8000) || (GetAsyncKeyState(VK_LBUTTON) & 0x8000))
    {
      if (score < inverse_operate_score)
      {
        if (left_right == LEFT)
          ball_dx = (ball_dx += ball_ddx) > ball_dx_max ? ball_dx_max : ball_dx;
        else
        {
          ball_dx = ball_dx_min;
          left_right = LEFT;
        }
        ball.ball_x = (ball.ball_x -= ball_dx) < ball_r ? ball_r : ball.ball_x;
      }
      else
      {
        if (left_right == RIGHT)
          ball_dx = (ball_dx += ball_ddx) > ball_dx_max ? ball_dx_max : ball_dx;
        else
        {
          ball_dx = ball_dx_min;
          left_right = RIGHT;
        }
        ball.ball_x = (ball.ball_x += ball_dx) > (max_y - 1 - ball_r) ? max_y - 1 - ball_r : ball.ball_x;
      }
    }
    else if ((GetAsyncKeyState(VK_RIGHT) & 0x8000) || (GetAsyncKeyState('D') & 0x8000) || (GetAsyncKeyState(VK_RBUTTON) & 0x8000))
    {
      if (score > inverse_operate_score)
      {
        if (left_right == LEFT)
          ball_dx = (ball_dx += ball_ddx) > ball_dx_max ? ball_dx_max : ball_dx;
        else
        {
          ball_dx = ball_dx_min;
          left_right = LEFT;
        }
        ball.ball_x = (ball.ball_x -= ball_dx) < ball_r ? ball_r : ball.ball_x;
      }
      else
      {
        if (left_right == RIGHT)
          ball_dx = (ball_dx += ball_ddx) > ball_dx_max ? ball_dx_max : ball_dx;
        else
        {
          ball_dx = ball_dx_min;
          left_right = RIGHT;
        }
        ball.ball_x = (ball.ball_x += ball_dx) > (max_y - 1 - ball_r) ? max_y - 1 - ball_r : ball.ball_x;
      }
    }
    else
    {
      ball_dx -= ball_ddx;
      if (ball_dx > ball_dx_min)
      {
        if (left_right == LEFT)
          ball.ball_x = (ball.ball_x -= ball_dx) < ball_r ? ball_r : ball.ball_x;
        else if (left_right == RIGHT)
          ball.ball_x = (ball.ball_x += ball_dx) > (max_y - 1 - ball_r) ? max_y - 1 - ball_r : ball.ball_x;
      }
      else
      {
        ball_dx = ball_dx_min;
        left_right = STOP;
      }
    }


    // 計(jì)算小球球心 y 位置(加速效果)
    int ii = 0;  // 用于確定小球位于哪塊木板上方
    while (ball.ball_y - plank_dy > plank[ii].plank_y - 1 - ball_r)
      ii++;


    if (ii < plank_num &&
      ball.ball_x >= plank[ii].plank_x && ball.ball_x <= plank[ii].plank_x + plank[ii].plank_len
      && (ball.ball_y - plank_dy == plank[ii].plank_y - 1 - ball_r || ball.ball_y >= plank[ii].plank_y - 1 - ball_r))
    {
      ball.ball_y = plank[ii].plank_y - 1 - ball_r;
      ball_dy = ball_dx_min;
    }
    else
    {
      ball_dy = (ball_dy += ball_ddx) > ball_dx_max ? ball_dx_max : ball_dy;
      ball.ball_y += ball_dy;
      if (ii < plank_num &&
        ball.ball_x >= plank[ii].plank_x && ball.ball_x <= plank[ii].plank_x + plank[ii].plank_len && ball.ball_y >= plank[ii].plank_y - 1 - ball_r)
      {
        ball.ball_y = plank[ii].plank_y - 1 - ball_r;
        ball_dy = ball_dx_min;
      }
      else if (ball.ball_y > max_y - 1 - ball_r)
        ball.ball_y = max_y - 1 - ball_r;
    }


    // 判斷小球是否觸碰尖刺
    if (ball.ball_x >= plank[ii].thorn_x - ball_r / 2 && ball.ball_x <= plank[ii].thorn_x + thorn_len + ball_r / 2
      && ball.ball_y == plank[ii].plank_y - 1 - ball_r && plank[ii].is_thorn)
      is_dead = true;


    // 繪制木板和小球
    DrawPlank();
    DrawBall(ball.ball_x, ball.ball_y);
    FlushBatchDraw();
    time_num++;


    // 打印分?jǐn)?shù),速度及是否開啟反向操作
    PrintScore();
    Sleep(sleep_time);
  }


private:
  // 構(gòu)造函數(shù)初始化參數(shù)
  RollingBall()
  {
    score = 0;
    die_top = 5;
    time_num = 0;
    sleep_time = 20;
    is_dead = false;
  }


  RollingBall(const RollingBall &rb) {}              // 禁止拷貝構(gòu)造
  RollingBall &operator = (const RollingBall &rb) {}        // 禁止賦值重載
  int sleep_time;                          // 游戲刷新時(shí)間間隔
  int time_num;                          // 記錄游戲刷新次數(shù)
  int die_top;                          // 頂部尖刺位置
  int score;                            // 記錄分?jǐn)?shù)
  bool is_dead;                          // 是否死亡
};






////////////////////////////////////////////////////
// main 主函數(shù)
int main()
{
  initgraph(max_x, max_y, NOMINIMIZE);
  srand((unsigned)time(NULL));


  // 獲取單例指針
  RollingBall *rb = RollingBall::GetInstance();


  rb->Introduce();
  rb->Initialize();
  BeginBatchDraw();


  while (!(GetAsyncKeyState(VK_ESCAPE) & 0x8000))
  {
    rb->GameRunning();
    if (rb->IsDead())
      break;
    if (_kbhit() && _getwch() == ' ')
      _getwch();
  }


  EndBatchDraw();
  rb->Finish();


  closegraph();
  return 0;
}

大家趕緊去動(dòng)手試試吧!

審核編輯:湯梓紅

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 游戲
    +關(guān)注

    關(guān)注

    2

    文章

    763

    瀏覽量

    26603
  • C語言
    +關(guān)注

    關(guān)注

    180

    文章

    7628

    瀏覽量

    139835
  • 編程
    +關(guān)注

    關(guān)注

    88

    文章

    3674

    瀏覽量

    94716
  • C++
    C++
    +關(guān)注

    關(guān)注

    22

    文章

    2116

    瀏覽量

    74606
  • 代碼
    +關(guān)注

    關(guān)注

    30

    文章

    4882

    瀏覽量

    70052

原文標(biāo)題:C/C++項(xiàng)目實(shí)戰(zhàn):《是男人就下一百層》,530 行源碼分享來啦!

文章出處:【微信號(hào):cyuyanxuexi,微信公眾號(hào):C語言編程學(xué)習(xí)基地】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。

收藏 人收藏

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    C++中的結(jié)構(gòu)和類

    C++ 仍然是嵌入式開發(fā)的少數(shù)??語言,但當(dāng)項(xiàng)目變得太大而無法有效使用 C 時(shí),開發(fā)人員通常會(huì)采用 C++。這些開發(fā)人員通常從 C 過渡到
    發(fā)表于 07-18 17:37 ?917次閱讀

    C語言與C++的區(qū)別

    在很大程度上,C++C的超集,這意味著一個(gè)有效的C程序也是一個(gè)有效的C++程序。
    發(fā)表于 09-16 10:20 ?1262次閱讀

    現(xiàn)代C++項(xiàng)目的最佳實(shí)踐

    本系列是開源書C++ Best Practises[1]的中文版,全書從工具、代碼風(fēng)格、安全性、可維護(hù)性、可移植性、多線程、性能、正確性等角度全面介紹了現(xiàn)代C++項(xiàng)目的最佳實(shí)踐。本文是該系列的第三篇。
    發(fā)表于 09-29 11:32 ?1390次閱讀

    編程實(shí)戰(zhàn)C++快遞入門與進(jìn)階!

    monitor”開發(fā)者在線講解各種C++開發(fā)實(shí)戰(zhàn)以及分享經(jīng)歷!1.CC++的基本語法的區(qū)別2.面向過程向面向?qū)ο蟮霓D(zhuǎn)變3.面向?qū)ο笾懈鱾€(gè)知識(shí)點(diǎn)的關(guān)系4.串口軟件在自動(dòng)化監(jiān)控中的重要
    發(fā)表于 08-09 16:21

    C++C/C++程序設(shè)計(jì)教程_C/C++概述

    C++基礎(chǔ)知識(shí),簡(jiǎn)要介紹了C++的一些簡(jiǎn)單知識(shí),概念,函數(shù)
    發(fā)表于 12-25 10:15 ?0次下載

    C++開發(fā)實(shí)戰(zhàn)PDF電子書免費(fèi)下載

    C++開發(fā)實(shí)戰(zhàn)》從初學(xué)者的角度全面介紹了使用C++進(jìn)行程序開發(fā)的各種技術(shù)。在內(nèi)容安排上由淺入深,讓讀者循序漸進(jìn)地掌握編程技術(shù);在內(nèi)容講解上結(jié)合豐富的圖解和形象的比喻,幫助讀者理解晦澀難懂的技術(shù)
    發(fā)表于 12-23 08:00 ?16次下載
    <b class='flag-5'>C++</b>開發(fā)<b class='flag-5'>實(shí)戰(zhàn)</b>PDF電子書免費(fèi)下載

    C++中mutable關(guān)鍵字詳解與實(shí)戰(zhàn)

    mutable關(guān)鍵字詳解與實(shí)戰(zhàn)C++中mutable關(guān)鍵字是為了突破const關(guān)鍵字的限制,被mutable關(guān)鍵字修飾的成員變量永遠(yuǎn)處于可變的狀態(tài),即使是在被const修飾的成員函數(shù)中。 在
    的頭像 發(fā)表于 09-10 09:23 ?5691次閱讀

    嵌入式項(xiàng)目實(shí)戰(zhàn)經(jīng)驗(yàn)

    嵌入式項(xiàng)目實(shí)戰(zhàn)經(jīng)驗(yàn)分享,C/C++、Linux、STM32、51單片機(jī)、FPGA、IoT、OpenCV、數(shù)字圖像處理、通信、算法!
    發(fā)表于 11-03 12:36 ?23次下載
    嵌入式<b class='flag-5'>項(xiàng)目</b><b class='flag-5'>實(shí)戰(zhàn)</b>經(jīng)驗(yàn)

    Linux C/C++ 學(xué)習(xí)路線

    一、秋招 Linux C/C++ offer 情況二、Linux C/C++ 方向的一些思考三、計(jì)算機(jī)基礎(chǔ)知識(shí)的梳理四、C++ 方向的深入學(xué)
    發(fā)表于 11-06 19:36 ?14次下載
    Linux <b class='flag-5'>C</b>/<b class='flag-5'>C++</b> 學(xué)習(xí)路線

    STM32實(shí)戰(zhàn)C++ IO.cpp

    這一章開始編寫代碼,主要是兩個(gè)方面,一是C++,二是進(jìn)行簡(jiǎn)單的IO封裝。其它教程一般是用C語言,從按鍵或LED燈開始,比較直觀,容易上手,但與實(shí)際應(yīng)用有一定的區(qū)別,這里要做的是實(shí)用控制程序,開始
    發(fā)表于 01-12 17:40 ?4次下載
    STM32<b class='flag-5'>實(shí)戰(zhàn)</b>三 <b class='flag-5'>C++</b> IO.cpp

    C++項(xiàng)目常見的命名規(guī)范

    本系列是開源書C++ Best Practises[1]的中文版,全書從工具、代碼風(fēng)格、安全性、可維護(hù)性、可移植性、多線程、性能、正確性等角度全面介紹了現(xiàn)代C++項(xiàng)目的最佳實(shí)踐。本文是該系列的第二篇。
    的頭像 發(fā)表于 09-27 09:12 ?2311次閱讀

    C/C++項(xiàng)目實(shí)戰(zhàn):2D射擊游戲開發(fā)(簡(jiǎn)易版)

    關(guān)于無阻塞延時(shí),首先,先要 ctime 創(chuàng)建一個(gè) clock_t 變量 a,初始化為 clock(),貌似是自從 1970 年到現(xiàn)在的毫秒數(shù)。我們要每隔 0.5 秒執(zhí)行函數(shù) func() 一次。
    的頭像 發(fā)表于 01-12 15:57 ?2367次閱讀

    淺談C語言與C++的前世今生

    C++開發(fā)人員將有這些問題歸咎于C,而C開發(fā)人員則認(rèn)為C++過于瘋狂。我覺得站在C的角度看C++
    發(fā)表于 05-26 09:27 ?606次閱讀
    淺談<b class='flag-5'>C</b>語言與<b class='flag-5'>C++</b>的前世今生

    C++之父新作帶你勾勒現(xiàn)代C++地圖

    為了幫助大家解決這些痛點(diǎn)問題,讓大家領(lǐng)略現(xiàn)代C++之美,掌握其中的精髓,更好地使用C++,C++之父Bjarne Stroustrup坐不住了,他親自操刀寫就了這本《C++之旅》!
    的頭像 發(fā)表于 10-30 16:35 ?1157次閱讀
    <b class='flag-5'>C++</b>之父新作帶你勾勒現(xiàn)代<b class='flag-5'>C++</b>地圖

    C++簡(jiǎn)史:C++是如何開始的

    MISRA C++:2023,MISRA? C++ 標(biāo)準(zhǔn)的下一個(gè)版本,來了!為了幫助您做好準(zhǔn)備,我們介紹了 Perforce 首席技術(shù)支持工程師 Frank van den Beuken 博士撰寫
    的頭像 發(fā)表于 01-11 09:00 ?855次閱讀
    <b class='flag-5'>C++</b>簡(jiǎn)史:<b class='flag-5'>C++</b>是如何開始的
    主站蜘蛛池模板: 亚欧成人中文字幕一区 | 色婷婷亚洲精品综合影院 | 高清一级 | 免费在线观看大片影视大全 | 天天cao在线 | 狠狠色综合色综合网络 | 亚洲视频一 | 四虎在线最新永久免费播放 | 乱子伦xxx欧美 | 亚洲欧洲一区二区三区在线 | 狠狠燥 | 久久五月女厕所一区二区 | 亚洲欧美视频在线播放 | 国产国语videosex另类 | 亚洲第一福利网站 | 国产精品久久久久久影院 | 久久久久综合中文字幕 | 俄罗斯毛片基地 | 污夜影院 | 日日夜夜操操 | 日韩一级视频免费观看 | 国产午夜剧场 | 女人张开腿让男人桶视频免费大全 | 91天天操| 欧美性天天| 久久作爱视频 | 在线h网站 | 国产午夜一区二区在线观看 | 亚洲国产成人久久一区久久 | 综合精品| 国产主播在线播放 | 添人人躁日日躁夜夜躁夜夜揉 | 亚洲成人免费 | 国产精品怡红院永久免费 | 国产精品免费久久 | 国产乱辈通伦影片在线播放 | 一级特黄aaa大片 | h色小视频 | 黄色大毛片| 3344免费播放观看视频 | 1024你懂的日韩 |