102 Topics

Member Avatar for
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
Member Avatar for Andy_Ballard

I would like to construct a neighbour list of multiple atoms. [CODE=python] AllAtoms = {} AllAtoms[0] = [0,[]] AllAtoms[1] = [0,[AllAtoms[0][0]]] AllAtoms[2] = [0,[AllAtoms[0][0]]] [/CODE] Every member of the dictionary is referencing other members of the dictionary. I do not know how to make this reference work so that when …

Member Avatar for Andy_Ballard
0
227
Member Avatar for chaienbungbu

As I see in some code having something like "[b]ClassName[u]&[/u][/b]". For example: [code] // this demo // check if a parameter passed to a member function is the object itself #include <iostream> using namespace std; class CDummy { public : int isitme ([b]CDummy[u]&[/u] param[/b]); }; int CDummy :: isitme ([b]CDummy[u]&[/u] …

Member Avatar for jbennet
0
224
Member Avatar for makan007

I would like to know how can the swapping function be implemented using pointers, void swap (int*, int*) [CODE] //function prototypes void swap(int& a, int& b); //function (passing by ref) void swap(int& a, int& b) { int t = a; a = b; b = t; }[/CODE] Is this correct? …

Member Avatar for problemkid
0
464
Member Avatar for Waylon

Hello! I'm working on this roguelike and I'm trying to make it so that the different "maps" can be loaded from text files. It was going pretty good until I tried to get it to return the filled array. Take a look: [CODE]void getMap(string str[10][10]){ ifstream myfile("world1.txt"); int a = …

Member Avatar for Lerner
0
90
Member Avatar for grib

Had a moment to sit down and plow through a chapter, and as usual, wound up stuck. My compiler is giving me a string of [inlinecode]undefined reference to SALES::[all my function names][/inlinecode] in my main function. It's entirely possible that there are problems within the function definitions, but right now …

Member Avatar for grib
0
263
Member Avatar for Fenrir190

[CODE] void readData(ifstream& file, char& operation, int& numOfData) // Purpose: To read data from a file specified by the user { file>>operation>>numOfData; if(operation == 'I') { Array<int>* array; array = new Array<int>(numOfData); } } [/CODE] That's where the problem is coming from. [CODE] const int DEFAULT_SIZE = 30; template <class …

Member Avatar for r.stiltskin
0
222
Member Avatar for Buffalo101

Hello, I'm having problems passing an array of structures to a function by reference. Is this a) needed b) achievable? My assignment's requirements aren't very thorough, but it is however in the "Reference parameters" section. [CODE]struct x{ int a; // this is irrelevant float b; }stud[10]; void mod( ??? ){ …

Member Avatar for Gaiety
0
133
Member Avatar for Namibnat

I am sorry to ask such a beginner question: I am just learning to use classes and objects in php and would like to know one simple thing - how to you reference one function (or should I call them methods?) from another within the class. When I specify a …

Member Avatar for omoabobade
0
160
Member Avatar for bentlogic

Hi Java Developers, wondering if someone can point out why references to 'Student' (successfully compiled java class) in my ValidRecords.java source file don't seem to resolve at compile time? It's important to say that ANY and ALL references to Student object from inside ValidRecords.java don't resolve... not just the one …

Member Avatar for peter_budo
0
334
Member Avatar for leoni

Hi All! I have a doubt about returning reference. I'll show you an example: [CODE] Vector &MakeVector() { Vector *result = new Vector<Dim>(); /*some more code*/ return *result; } [/CODE] now I can call the function MakeVector to assign it result in this two ways: [CODE] Vector v = MakeVector(); …

Member Avatar for leoni
0
142
Member Avatar for happygeek

It looks like Encyclopaedia Britannica, for hundreds of years the first name you thought of when the word 'encyclopaedia' was mentioned until Wikipedia came along and kicked sand in its face, is about to change. Sure, EB has changed rather a lot since it first saw the light of day …

Member Avatar for S Williams
0
178

The End.