With the frequent occurrence of security incidents caused by smart contract vulnerabilities, existing detection tools lack sufficient support for multiple programming languages, particularly in terms of their inability to detect vulnerabilities at the source code level in C/C++ smart contracts. To address this issue, a deep learning-based vulnerability detection method for C/C++ smart contracts was proposed and a function-body slicing-level detection tool CDFSentry was designed. Starting from the perspective of source code, the concept of target regions in deep learning applications within the field of image processing was applied to smart contract vulnerability detection. The implementation of the tool involved four steps: first, extracting function-body slices related to vulnerabilities to obtain complete function-body information; second, annotating the extracted slices; third, encoding the slices into vectors to convert them into input formats suitable for deep learning; four, completing vector labeling and model training. Besides, by analyzing the causes of vulnerabilities in C/C++ smart contracts, five types of vulnerabilities were defined: integer overflow, permission control, token transfer, memory management, and transaction delay, and a dataset containing 5 024 source codes was constructed to solve the problems of insufficient open-source datasets and inconsistent definitions of vulnerability types in this field. Experimental results on this dataset demonstrate that while the comparable deep learning tool GNNSCVulDetector can only detect one type of vulnerability, CDFSentry detects five types with 12.68 percentage points higher accuracy. By leveraging deep learning to detect vulnerabilities in C/C++ smart contract source code, CDFSentry reduces reliance on experts while offering higher detection accuracy and broader coverage than similar tools. In addition, through continuous learning and training, its detection ability can be improved continuously.