C++

C++/CLI:使用 C++/CLI、FFmpeg …

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. 前言 最近因為工作需要在 C/C++ 環境底下開發出影片檔讀取並撥放功能,由於有跨平台測試的需求 (Windows/Linux),最直覺想到的就是使用 FFmpeg。Windows 會用 C++/CLI CLR 開發視窗畫面;Linux 則是靠 MiniGUI 顯示到 LCD 模組上,這篇文章主要是紀錄我如何在 Visual Studio 中完成 CLR WinForm 簡 …

C/C++:0~9字元(char)轉成整 …

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. char a = '4'; int ia = a - '0'; /* check here if ia is bounded by 0 and 9 */ Refer Convert char to int in C and C++ - Stack Overflow

C/C++:自訂 Debug 訊息

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. #include <stdarg.h> #include <stdio.h> #define COLOR_X "\033[0m" #define COLOR_I "\033[92m" #define COLOR_D "\033[96m" #define COLOR_W …

C++:常用 Filesystem library …

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. 紀錄下目前用過的功能 路徑表示 filesystem::path path 列出目錄(資料夾)的內容 filesystem::directory_iterator(path) 取得最後寫入時間 filesystem::last_write_time() 取出檔名 path.filename() 取出副檔名 path.filename().extension() …

C++: OpenCV Source Code …

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. 上官網抓 souce code,目前最新是 4.X.X,根據需要也可以找 3.X.X 使用 CMake (1) 安裝 CMake,為了建立編譯環境及專案 (2) 設定 Source Code 、Build Target 路徑 (3) 第一次按下 Configure,需要設定”生成專案格式”及"編譯平台 (windows 通常是 x64 or Win32)” (4) …

C++: 取得資料夾下所有檔名

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. #include<iostream> #include<string> #include<io.h> #include<cstdio> #include<cstdlib> #include<cstring> using namespace std; void fileSearch(string …