zoukankan      html  css  js  c++  java
  • paip.c++ tree parse tpath解析器

    paip.c++ tree parse tpath解析器


    作者Attilax ,  EMAIL:1466519819@qq.com
    来源:attilax的专栏
    地址:http://blog.csdn.net/attilax

    主要算法:L

    string Lastpath="";
     string lastname="";
     string curpath="";
     string curname="";
     string parentpath=""    ;
     
     while(getline(file,temp))
    {
    if(curlevel> lastlevel )
       {
       // curpath=   Lastpath+   "/"+curname;
      parentpath=Lastpath;
       }
        else if(curlevel< lastlevel )
       {
       parentpath= getLevelReduceNodeparentpath( Lastpath,curlevel);
       }
      
        if( parentpath=="")
          curpath= curname;
       else
        curpath=   parentpath+   "/"+curname;
       
       
     //set last info  
       Lastpath=curpath;
       lastname=curname;
       lastlevel=curlevel;

     i++;
     if(i>=line)
           break;
      
    }
    return     curpath;
     

  • 相关阅读:
    会跳舞的树(只用HTML+CSS)(转)
    国内UED收录
    HDU 1078 dfs+dp
    HDU 1278
    HDU 4499
    HDU 4597
    POJ2777
    POJ1780 Code
    简单的Fleury算法模板
    POJ 2513 无向欧拉通路+字典树+并查集
  • 原文地址:https://www.cnblogs.com/attilax/p/15199478.html
Copyright © 2011-2022 走看看