linked list from java to c++
<p>here is code to implement linked list i hope you understand main purpose  of this code such kind of code is written in java  and i am trying to implement in  c++</p>

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

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

    }

}; link next;


class  linked_list{
public :
    link first;

public:
     linked_list(){

         first=NULL;
     }

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






link    newlink= link(id,dd);
newlink.next=first;
 first=newlink;

}








int main(){




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

<p>but it has some bugs please help me  i  think it is possible to rewrite  written code in java in c++ </p>
