欧美1区2区3区激情无套,两个女人互添下身视频在线观看,久久av无码精品人妻系列,久久精品噜噜噜成人,末发育娇小性色xxxx

嵌入式筆試刷題(第29天)

1. 實(shí)現(xiàn)字符串類 String 的構(gòu)造、析構(gòu)與賦值函數(shù)

class String {
public:
    String(const char* str = NULL) {
        if (str) {
            m_data = new char[strlen(str) + 1];
            strcpy(m_data, str);
        } else {
            m_data = new char[1];
            *m_data = '\0';
        }
    }

    String(const String &other) {
        m_data = new char[strlen(other.m_data) + 1];
        strcpy(m_data, other.m_data);
    }

    ~String() {
        delete[] m_data;
    }

    String& operator=(const String &other) {
        if (this == &other) return *this;
        delete[] m_data;
        m_data = new char[strlen(other.m_data) + 1];
        strcpy(m_data, other.m_data);
        return *this;
    }

private:
    char* m_data;
};

2. 八皇后問題 C 語言實(shí)現(xiàn)

#include <stdio.h>
#define N 8

int count = 0;
int board[N];

int isSafe(int row, int

剩余60%內(nèi)容,訂閱專欄后可繼續(xù)查看/也可單篇購買

嵌入式筆試專欄 文章被收錄于專欄

本專欄系統(tǒng)整理了嵌入式方向筆試中常見的知識(shí)點(diǎn)和高頻考題,涵蓋基礎(chǔ)理論、常用算法、C語言陷阱、操作系統(tǒng)原理、驅(qū)動(dòng)開發(fā)、常見外設(shè)通信協(xié)議(如 I2C/SPI/UART)、RTOS、Linux 內(nèi)核、以及實(shí)用電路知識(shí)等內(nèi)容。

全部評(píng)論
點(diǎn)贊 回復(fù) 分享
發(fā)布于 04-25 21:45 山西
接好運(yùn)
點(diǎn)贊 回復(fù) 分享
發(fā)布于 04-25 21:42 黑龍江

相關(guān)推薦

嘀哩咕嚕說啥呢:27屆,這簡(jiǎn)歷,強(qiáng)的逆天,大廠實(shí)習(xí)隨便沖,面經(jīng)多少看點(diǎn),hot100刷完,大廠隨便挑了
點(diǎn)贊 評(píng)論 收藏
分享
04-18 00:32
已編輯
中南大學(xué) Java
點(diǎn)贊 評(píng)論 收藏
分享
評(píng)論
1
收藏
分享

創(chuàng)作者周榜

更多
??途W(wǎng)
??推髽I(yè)服務(wù)