I had this code in a simple file yesterday and it worked perfectly. But now I need to separate the header and the source file. And I did but code gives an error and I don't know why.
This is my header
#ifndef LISTE_HPP
#define LISTE_HPP
#include <malloc.h>
#include <stdio.h>
class Liste {
public:
struct node {
int veri;
struct node *sonraki;
struct node *onceki;
};
struct node *baslangic = NULL;
int maxobeb = 0;
struct node *dugumOlustur(int);
void yazdir();
void ListeyeEkle(int);
int ModAl(int, int);
int ObebHesapla(int, int);
};
#endif
and this is the source file
#include "Liste.hpp"
node* Liste::dugumOlustur(int veri) //here gives error code doestn recognize node please help me
{
struct node* yeniDugum = (struct node*)malloc(sizeof(struct node));
yeniDugum->veri = veri;
yeniDugum->sonraki = NULL;
yeniDugum->onceki = NULL;
return yeniDugum;
}
My source file includes other fuctions too but the error is caused in that line so I didn't included all the source.
Liste::node*instead ofnode*on that line.