markdown中目录实现(页内跳转)
·
整体使用HTML那一套,基于瞄点完成。在链接处使用如下结构:
[]()
[]代表显示名称
()代表跳转位置
# <a id="catlog">目录 </a>
- [string转const char *](#page_jump)
# <a id="page_jump">string转const char *</a>
```javascript
/*
string转const char *
*/
#include<iostream>
#include<string>
using namespace std;
int main() {
string str = "hello world!";
const char *p = str.c_str();
cout << p << endl;
return 0;
}
ps:应该保证每一处跳转id都不同才能找得到
更多推荐
所有评论(0)