full code from java in c++
<p>here is  full code  from algorithm and data structure in java  written in c++</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;
class link {
public:
    int idata;
    double ddata;
    link *next;
    link ( int id,double dd){
        idata=id;
        ddata=dd;
    }
public :
    void display(){

        cout&lt;&lt;idata&lt;&lt;"=&gt;";
        cout&lt;&lt;ddata;

    }

}; 


class  linked_list{
public :
    link *first;

public:
     linked_list(){

         first=NULL;
     }
      ~linked_list(){

          while (first!=NULL){
              link *ptr=first-&gt;next;
              delete first;
              first=ptr;
          }

      }
public:
    bool isempthy(){
        return (first==NULL);
    }
    void insert(int  id,double dd){


link *newlink= new link(id,dd);
newlink-&gt;next=first;
 first=newlink;

}
public:
    link deletefirst(){

        link *temp=first;
        first=first-&gt;next;
        return *temp;

    }

    void displaylist(){
        cout&lt;&lt;"List (first--&gt;last";

        link *current=first;

        while (current!=NULL){
            current-&gt;next;
            current.display();
        }



    }






}



int main(){

    linked_list ll;
    ll.insert(22,12);
    ll.insert(44,35);
    ll.insert(12,46);
    ll.insert(100,23.45);
    while (!ll.isempthy()){
        link alink=ll.deletefirst();

        alink.display();
    }


     return 0;
}
</code></pre>

<p>error is that this  fragment</p>

<pre><code>current.display();  does not work  please help
</code></pre>
