原创 C--函數參數的執行順序

函數的參數的執行依賴於編譯器,有可能從左到右,也有可能從右到左, 程序中存在一定的順序點。 #include <stdio.h> int func(int i, int j) { printf(“i = %d, j = %d\n”

原创 ATK-LORA-01/02

正點原子的模塊 固件(Firmware)就是寫入EPROM(可擦寫可編程只讀存儲器)或EEPROM(電可擦可編程只讀存儲器)中的程序。 固件是指設備內部保存的設備“驅動程序”,通過固件,操作系統才能按照標準的設備驅動實現特定機器的

原创 C--遞歸案例1

斐波拉存在如下數列1、1、2、4、7、13、24、44、81、149……,現要求該數列第n項的值(n從0開始算)。 #include “stdio.h” int strlen_r(const char *s) { if( *s )

原创 C++---深拷貝

#include <iostream> #include <string> using namespace std; class Test { int* m_pointer; public: Test()

原创 C++--異常處理1

#include <iostream> #include <string> //如果在工程中用到浮點數進行判斷相除的時候,記得進行異常處理判斷。 using namespace std; double divide(double

原创 C++--二階構造的實現

` #include <stdio.h> class TwoPhaseCons { private: TwoPhaseCons() // 第一階段構造函數 { } bool constru

原创 C++--自定義內存管理

1、關於動態內存分配 2、new / delete的重載 3、重載new[] / delete[] 4、動態內存申請的結果 1、動態內存申請的結果 2、跨編譯器統一new的行爲 5、小結 1、關於動態內存分配 new關鍵字與mal

原创 STM32cubeMX硬件IIC問題

注意寫數據的時候,加延時,單個字節讀取 #if 1 printf("\r\n***************I2C Example*******************************\r\n"); printf("Wri

原创 C++--靜態、、動態聯編

#include #include using namespace std; class Parent { public: virtual void func() { cout << “void func()” << endl

原创 C++---二階構造模式

#include using namespace std; class Tw0PhaseCons { private: Tw0PhaseCons() { } bool ConStruct() { return true

原创 VScode--怎麼編譯運行C/C++

https://blog.csdn.net/kirksong/article/details/82288722 根據前面博客,自己下載了MINGW-w64的安裝包,連接如下: https://www.jb51.net/softjc

原创 網絡芯片比較

原址:http://blog.chinaunix.net/uid-27768683-id-4266118.html 網卡工作在osi的最後兩層,物理層(PHY)和數據鏈路層(MAC)。 物理層定義了數據傳送與接收所需要的電與光信號

原创 linux---編譯內核出問題make Image

編譯內核scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: No such file or directory 原創beilson 編譯內核命令 make ARCH=

原创 stm32程序下載不進去問題之一

很有可能是復位電路問題,特別是自己製作的核心板,注意HSE外部時鐘的選擇問題,可以用配置工具配置好時鐘參考或者將其作爲模板都可以,加快開發進度。復位電路怎麼復位呢?特別簡單,製造一個低脈衝即可。 時鐘配置是否正確?看延時是否正確,

原创 C++---多態

#include <iostream> #include <string> using namespace std; class Boss { public: int fight() { int