5 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for Tsaou

I keep getting loads of linker errors that probably have something to do with virtual-functions/definitions and/or static class members... I've seen several relevant posts but none of the solutions suggested work, can you see wht the problem is here? My projects consists of 3 files: BALLS.H #include <iostream> using namespace …

Member Avatar for Ancient Dragon
0
505
Member Avatar for James19142

I'm writing classes for widgets on a ui. While planning what I would do, I realized majority of the of the classes would look very similar. What I decided to do was to use a macro that takes a few parameters to define the similar parts of the class bodies. …

Member Avatar for James19142
0
807
Member Avatar for aleX_X

Keeping getting into errors in my code...this looks to be the wierdest so far... [CODE]class bug: public living{ protected: bool ate; int energy; public: virtual void moveToFood(point hunter, point food); bool eatIt(point hunter, point food){ int hx, hy, fx, fy; hx=hunter.getx(); hy=hunter.gety(); fx=food.getx(); fy=food.gety(); if((hy==fy)&&(hx==fx)) ate=true; else ate=false; return ate; …

Member Avatar for daviddoria
0
415
Member Avatar for mcheng

Hi, i'm new to C++ and i understand someone else has asked this question on this forum before. I read the replies but still don't know how to resolve my error. gcc version is 4.2.2. The linker error i encountered is build_products/shared/x86/sgos_native/debug/gcc_v4.4.2/ced.o: In function `CEA_Disk_lister::CEA_Disk_lister(CEA_Disk*)': ced.cpp:(.text._ZN15CEA_Disk_listerC1EP8CEA_Disk[_ZN15CEA_Disk_listerC1EP8CEA_Disk]+0x25): undefined reference to `vtable …

Member Avatar for Narue
0
1K
Member Avatar for jonyb222

Arrival.o: In function `NodeItem': /home/jonyb/Desktop/A3-Q2/NodeItem.h:5: undefined reference to `vtable for NodeItem' Arrival.o: In function `~Event': /home/jonyb/Desktop/A3-Q2/Event.h:8: undefined reference to `NodeItem::~NodeItem()' Event.o:(.rodata._ZTI5Event[typeinfo for Event]+0x8): undefined reference to `typeinfo for NodeItem' These 3 errors repeat themselves for all my files accessing NodeItem.h and NodeItem.cpp Now I've looked around and all I could …

Member Avatar for jonyb222
0
8K

The End.