13 Star 104 Fork 28

唐佐林 / DTLib

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

DTLib

介绍

这是一个使用经典C++编写的微型模板库,包含了数组类,链表类,二叉树类等通用数据结构类型,非常适合于教学和科研场景。

软件架构

输入图片说明

Demo

#include <iostream>
#include "DTLib/DynamicList.h"
#include "DTLib/LinkList.h"

using namespace DTLib;
using namespace std;

int main()
{
    cout << "ListDemo(): " << endl;

    LinkList<double> list;
    DynamicList<double> dl(50);

    for(int i=0; i<10; i++)
    {
        dl.insert(i/10.0);
    }

    dl.remove(5);
    
    for(int i=0; i<dl.length(); i++)
    {
        list.insert(dl[i]);
    }

    for(list.move(0); !list.end(); list.next())
    {
        cout << list.current() << endl;
    }

    return 0;
}

Repository Comments ( 3 )

Sign in to post a comment

About

这是一个使用经典C++编写的微型模板库,包含了数组类,链表类,二叉树类等通用数据结构类型,非常适合于教学和科研场景。 expand collapse
C++ and 2 more languages
MIT
Cancel

Releases (1)

All

Contributors

All

Activities

Load More
can not load any more
C++
1
https://git.oschina.net/delphi-tang/dtlib.git
git@git.oschina.net:delphi-tang/dtlib.git
delphi-tang
dtlib
DTLib
master

Search

184635 d8eb8a04 1850385 161156 f1cf3f24 1850385