extern c详解(下)

文章修改自:<wbr style="line-height:22px"><a rel="nofollow" href="http://wenku.baidu.com/view/8872c444b307e87101f69650.html" style="color:rgb(207,121,28); line-height:22px; text-decoration:none">http://wenku.baidu.com/view/8872c444b307e87101f69650.html</a><wbr style="line-height:25px"><div style="line-height:25px"> <div style="line-height:25px"><span style="font-size:16px; line-height:28px"><span style="line-height:28px">三、C和C++互相调用</span></span></div> <div style="line-height:25px"><span style="color:#003366; line-height:25px">我们既然知道extern "C"是实现的类C和C++的混合编程。下面我们就分别介绍如何在C++中调用C的代码、C中调用C++的代码。首先要明白C和C++互相调用,你得知道它们之间的编译和连接差异,及如何利用extern "C"来实现相互调用。</span></div> <div style="line-height:25px"><span style="line-height:25px">3.1、C++的编译和连接</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">C++是一个面向对象语言(虽不是纯粹的面向对象语言),它支持函数的重载,重载这个特性给我们带来了很大的便利。为了支持函数重载的这个特性,C++编译器实际上将下面这些重载函数:</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">1<span style="line-height:25px; white-space:pre"> </span>void print(int i);</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">2<span style="line-height:25px; white-space:pre"> </span>void print(char c);</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">3<span style="line-height:25px; white-space:pre"> </span>void print(float f);</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">4<span style="line-height:25px; white-space:pre"> </span>void print(char* s);</span></div> <div style="line-height:25px">编译为:</div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">1<span style="line-height:25px; white-space:pre"> </span>_print_int</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">2<span style="line-height:25px; white-space:pre"> </span>_print_char</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">3<span style="line-height:25px; white-space:pre"> </span>_print_float</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">4<span style="line-height:25px; white-space:pre"> </span>_pirnt_string</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">这样的函数名,来唯一标识每个函数。不同的编译器实现可能不一样,但是都是利用这种机制。所以当连接是调用print(3)时,它会去查找_print_int(3)这样的函数。正是因为这点,重载被认为不是多态,多态是运行时动态绑定(“一种接口多种实现”),如果硬要认为重载是多态,它顶多是编译时“多态”。</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">C++中的变量,编译也类似,如全局变量可能编译g_xx,类变量编译为c_xx等。连接是也是按照这种机制去查找相应的变量。</span></div> <div style="line-height:25px"><span style="line-height:25px">3.2、C的编译和连接</span></div> <div style="line-height:25px"><span style="color:#003366; line-height:25px">C语言中并没有重载和类这些特性,故并不像C++那样print(int i),会被编译为_print_int,而是直接编译为_print等。因此如果直接在C++中调用C的函数会失败,因为连接是调用C中的print(3)时,它会去找_print_int(3)。因此extern "C"的作用就体现出来了。</span></div> <div style="line-height:25px"><span style="line-height:25px">3.3、C++中调用C的代码</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">假设一个C的头文件cHeader.h中包含一个函数print(int i),为了在C++中能够调用它,必须要加上extern关键字(原因在extern关键字那节已经介绍)。它的代码如下:</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#ifndef C_HEADER</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#define C_HEADER</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#0000ff; line-height:25px">extern void print(int i);</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#endif C_HEADER</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">相对应的实现文件为cHeader.c的代码为:</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#include &lt;stdio.h&gt;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#include "cHeader.h"</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>void print(int i)</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span> printf("cHeader %d\n",i);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">现在C++的代码文件C++.cpp中引用C中的print(int i)函数:</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#0000ff; line-height:25px">extern "C"</span><span style="color:#3366ff; line-height:25px">{</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#include "cHeader.h"</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>int main(int argc,char** argv)</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span> print(3);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span> return 0;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"><span style="line-height:25px">3.4、C中调用C++的代码</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">现在换成在C中调用C++的代码,这与在C++中调用C的代码有所不同。如下在cppHeader.h头文件中定义了下面的代码:</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#ifndef CPP_HEADER</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#define CPP_HEADER</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#0000ff; line-height:25px">extern "C" void print(int i);</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#endif CPP_HEADER</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">相应的实现文件cppHeader.cpp文件中代码如下:</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#include "cppHeader.h"</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>#include &lt;iostream&gt;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>using namespace std;</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#0000ff; line-height:25px">void print(int i)</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span> cout&lt;&lt;"cppHeader "&lt;&lt;i&lt;&lt;endl;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">在C的代码文件c.c中调用print函数:</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#0000ff; line-height:25px">extern int print(int i);</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>int main(int argc,char** argv)</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span> print(3);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span> return 0;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"> <span style="line-height:25px">注意:</span><span style="color:#000080; line-height:25px">在C的代码文件中直接</span><span style="color:#0000ff; line-height:25px">#include "cppHeader.h"</span><span style="color:#000080; line-height:25px">头文件,编译出错。而且如果不加</span><span style="color:#0000ff; line-height:25px">extern int print(int i)</span><span style="color:#000080; line-height:25px">编译也会出错。</span> </div> <div style="line-height:25px"><span style="line-height:25px">四、同一模块中时C和C++混合使用</span></div> <div style="line-height:25px"> <div style="line-height:25px">如果C和C++在同一模块中,那么他们可以直接混合使用,即C的函数和变量可以直接在C++中使用,C++的函数和变量也可以直接在C中使用</div> </div> <div style="line-height:25px"> <span style="line-height:25px">如下例</span><span style="color:#003366; line-height:25px">:</span> </div> <div style="line-height:25px"> <div style="line-height:25px"> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">#include &lt;stdio.h&gt;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">#include &lt;iostream&gt;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">using namespace std;</span></div> <div style="line-height:25px"> <span style="color:#ff6600; line-height:25px">typedef int (</span><span style="color:#99cc00; line-height:25px">*FT</span><span style="color:#ff6600; line-height:25px">) (const void* ,const void*);</span><span style="color:#3366ff; line-height:25px">//style of C++</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">int x=0;</span></div> <div style="line-height:25px"> <span style="color:#99cc00; line-height:25px">extern "C"</span><span style="color:#3366ff; line-height:25px">{</span> </div> <div style="line-height:25px"> <span style="color:#3366ff; line-height:25px"> </span><span style="color:#ff6600; line-height:25px">typedef int (*CFT) (const void*,const void*)</span><span style="color:#3366ff; line-height:25px">;//style of C</span> </div> <div style="line-height:25px"> <span style="color:#3366ff; line-height:25px"> </span><span style="color:#ff6600; line-height:25px">void qsort(void* p,size_t n,size_t sz,CFT cmp)</span><span style="color:#3366ff; line-height:25px">//style of C</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>x=1;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>cout&lt;&lt;"Hello"&lt;&lt;endl;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>int result=cmp(0,0);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>printf("in qsort,result is %d\n",result);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#0000ff; line-height:25px">int y=0;</span> </div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#ff6600; line-height:25px">class A</span><span style="color:#3366ff; line-height:25px">{</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>public:</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#ff6600; line-height:25px">A()</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>log(100);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>log(10,20);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#ff6600; line-height:25px">void log(int i)</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>cout&lt;&lt;"log"&lt;&lt;i&lt;&lt;endl;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>};</span></div> <div style="line-height:25px"> <span style="line-height:25px; color:rgb(51,102,255); white-space:pre"></span><span style="color:#ff6600; line-height:25px">void log(long a,long b)</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>cout&lt;&lt;"log a:"&lt;&lt;a&lt;&lt;"b:"&lt;&lt;b&lt;&lt;endl;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>};</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>};</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> <div style="line-height:25px"> <span style="color:#ff6600; line-height:25px">void isort(void* p,size_t n,size_t sz,FT cmp)/</span><span style="color:#3366ff; line-height:25px">/style of C++</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>y=1;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>int result=cmp(0,0);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>printf("in Isort,result is %d\n",result);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> <div style="line-height:25px"> <span style="color:#ff6600; line-height:25px">void xsort(void* p,size_t n,size_t sz,CFT cmp)</span><span style="color:#3366ff; line-height:25px">//style of C</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>int result=cmp(0,0);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>printf("in Xsort,result is %d\n",result);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> <div style="line-height:25px"> <span style="color:#ff6600; line-height:25px">extern "C" void ysort(void* p,size_t n,size_t sz,FT cmp)</span><span style="color:#3366ff; line-height:25px">//style of C</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>int result=cmp(0,0);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>printf("in Ysort,result is %d\n",result);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> <div style="line-height:25px"> <span style="color:#ff6600; line-height:25px">int compare(const void*,const void*)</span><span style="color:#3366ff; line-height:25px">//style of C++</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>return 1;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> <div style="line-height:25px"> <span style="color:#ff6600; line-height:25px">extern "C" int ccomp(const void*,const void*)/</span><span style="color:#3366ff; line-height:25px">/style of C</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>return 0;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">void f(char* v,int sz)</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">{</span></div> <div style="line-height:25px"><span style="color:#ff6600; line-height:25px"><span style="line-height:25px; white-space:pre"></span>A a;</span></div> <div style="line-height:25px"><span style="color:#ff6600; line-height:25px"><span style="line-height:25px; white-space:pre"></span>a.log(1000);</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> qsort(v,sz,1,&amp;compare);//ok</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> qsort(v,sz,1,&amp;ccomp);//ok</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"> </span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> isort(v,sz,1,&amp;compare);//ok</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> isort(v,sz,1,&amp;ccomp);//ok</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"> </span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> xsort(v,sz,1,&amp;compare);//ok</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> xsort(v,sz,1,&amp;ccomp);//ok</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"> </span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> ysort(v,sz,1,&amp;compare);//ok</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px"> ysort(v,sz,1,&amp;ccomp);//ok </span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">int main()</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">{</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>f(0,0);</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>return 0;</span></div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">}</span></div> </div> </div> <div style="line-height:25px"> <span style="color:#0000ff; line-height:25px">编译命令</span><span style="color:#3366ff; line-height:25px">:</span> </div> <div style="line-height:25px"><span style="color:#3366ff; line-height:25px">g++ test.cpp -o test.exe</span></div> <div style="line-height:25px"> <span style="line-height:25px">注意</span>:<span style="color:#000080; line-height:25px">typedef int (*FT) (const void* ,const void*),表示定义了一个函数指针的别名FT,这种函数指针指向的函数有这样的特征:返回值为int型、有两个参数,参数类型可以为任意类型的指针(因为为void*)。</span> </div> <div style="line-height:25px"><span style="color:#003366; line-height:25px">最典型的函数指针的别名的例子是,信号处理函数signal,它的定义如下:</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">1<span style="line-height:25px; white-space:pre"> </span>typedef void (*HANDLER)(int);</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">2<span style="line-height:25px; white-space:pre"> </span>HANDLER signal(int ,HANDLER);</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">上面的代码定义了信函处理函数signal,它的返回值类型为HANDLER,有两个参数分别为int、HANDLER。 这样避免了要这样定义signal函数:</span></div> <div style="line-height:25px"><span style="color:#0000ff; line-height:25px">void (*signal (int ,void(*)(int) ))(int)</span></div> <div style="line-height:25px"> <span style="color:#000080; line-height:25px">比较之后可以明显的体会到typedef的好处。</span> </div> </div> </wbr></wbr>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值