Skip to content

基础语法:30、extern"C"的用法 #155

Description

@RightOff

(1)C++调用C函数里的第一行代码是不是应该改为下边这样
extern "C" int add(); // 此处声明告诉C++编译器,add是外部C语言函数

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions