Solved undefined reference
-
@SGaist said in undefined reference:
way, why do you have a folder named "
this is kontrol function :int kontrol(int rastgele_eleman,int indis_vektor)// i1 i>0 durumu için kontrol { int durum; if((gecici_haftaici_gunleritut.contains(rastgele_eleman+1)==true || gecici_haftaici_gunleritut.contains(rastgele_eleman-1)==true || secilen_ozelgunler[indis_vektor]==(rastgele_eleman-1) || secilen_ozelgunler[indis_vektor]==(rastgele_eleman+1))==1) { durum=1; } else { durum=0; } return durum; }
this is header file :
int kontrol(int,int);
and rastgele_eleman is integer as random value between (0-31), indis_vektor is indeks of loop
-
by the way i changed return value as boolean and modified header file. but it did not work
-
Hi
Looks fine.
so is kontrol(int rastgele_eleman,int indis_vektor) in same file that you call it ?i wonder why it says `Widget::kontrol(int, int)' in error when its clearly not part of Widget.
Did you declare it inside of a class in .h or or outside ?
i wonder if it should be
int Widget::kontrol(int rastgele_eleman,int indis_vektor)// i1 i>0 durumu için kontrol
{ ...
in the cpp -
i am controling
-
namespace Ui { class Widget; } class Widget : public QWidget { Q_OBJECT public: explicit Widget(QWidget *parent = 0); ~Widget(); int boyut_hafta_sonu(); int boyut_hafta_ici(); QVector<int> aylarin_haftasonlarini_al() const; QVector<int> secilen_ayi_al(); int sirasini_bul(QVector<int> &,int); void ozel_gun_nobeti_belirle(); int kontrol(int,int); int kontrol_son_adim(int,int); }
this is header file
-
Ok :)
super, the issue is you forgot to mention Widget:: for its
implementation in cpp
You showed
int kontrol(int rastgele_eleman,int indis_vektor)// i1 i>0 durumu için kontrol
{
but it should have beenint Widget::kontrol(int rastgele_eleman,int indis_vektor)// i1 i>0 durumu için kontrol
{since it belongs to the Widget class.
-
in addition that, my sirasini_bul function working in void Widget::nobet_gunleri_belirle()
secilen_ay.erase(secilen_ay.begin()+sirasini_bul(secilen_ay,rastgele_dizi_elemani));
-
Thank you so much, how did i forget this :( it is working now. thank you for all of you
-
@veysel.olgun
well shit happens :)
Good it was something simple to fix -
fortunately :)