All Questions
Tagged with undefined-reference class
26
questions
0
votes
0
answers
28
views
C++, undefined reference to simple class [duplicate]
I'm using Netbeans IDE8.2 of Linux. The following very simple code is not accepted:
class Instrument
{
public:
Instrument();
void MakeSound(){
cout<<"Instrument plays...&...
0
votes
0
answers
38
views
Undefined Reference [duplicate]
I am learning about classes in c++, so I am writing the following simple code in separate files and while vscode is not showing any problems, the compiler is giving me an error when compiling.
main....
-2
votes
1
answer
395
views
Getting undefined reference to a properly defined friend function -_- [duplicate]
So... I was happily working on a project and then I was going to implement a friend function, which returns an object of the class after generating a random number of arbitrary size. On compilation, ...
0
votes
0
answers
378
views
C++: Undefined reference to 'NameSpace::Class::Constructor'
I'm starting with C++ and I'm trying to create a class program, however, when I try to run it appears the error: C++: Undefined reference to 'NameSpace::Class::Constructor. The code is shown below:
...
0
votes
1
answer
2k
views
C++ Error: Undefined Reference When Initializing a Class Object
This is my first step into the world of C++. I am experimenting with a simple program that is using a class. The program is to prompt the user for a username and age, then create a class object with ...
0
votes
0
answers
26
views
C++ error: undefined reference. What does this error mean? (Using a linked list header and implementation file) [duplicate]
I was looking at my textbook on how to use some basic Linked List operations in C++. I tried to test out one of the examples of using the "appendNode" member function for the class ...
1
vote
1
answer
50
views
C++ unable to create template constructor with template parameter [duplicate]
person<worker> people (w);
I have person class and worker class, I want to create people objects from the person class.
//person.cpp
template <class T>
person<T>::~person()
{
//...
0
votes
3
answers
470
views
Student name and mark class in python - undefined error while it is defined
I honestly, did not want to paste this because it is a silly question but I tried and changed the code many times. The last few lines show the error of undefined object. Can you please help?
class ...
-1
votes
2
answers
1k
views
Defined functions inside a class are not recognized as defined when I use them
I have this code, but when I try to use the re-defined str function it doesn´t print anything and, more important, the defined function named "cuadrant" doesn´t work as it´s not defined according to ...
0
votes
1
answer
736
views
Undefined reference to vtable with nested class
When I try to compile the following code:
Alien::Action::Action(ActionType type, float x, float y) {
Action::type = type;
pos = Vec2(x, y);
}
Alien::Alien(float x, float y, int nMinions) {
...
1
vote
1
answer
222
views
undefined reference to `Cat::Grizzly()'| [duplicate]
so I just started learning C++ literally yesterday and thanks to some prior experience with Lua I'm catching on pretty fast. I've been doing a beginner course on it at http://courses.caveofprogramming....
0
votes
1
answer
73
views
undefined-reference Error when defining a function in the *.cpp instead of in the *.h [duplicate]
I have got a problem: I have 2 classes: mainwindow and ErgebnisAusFortran which look like this:
mainwindow.h:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
...
0
votes
0
answers
104
views
error undefined reference to
Hi I have some code that always gives me a " undefined reference-Error"
Eingabewerte.h
#ifndef EINGABEWERTE_H
#define EINGABEWERTE_H
class EingabeWerte
{
public:
...
0
votes
1
answer
11
views
Cannot access class constant from class method?
When I try to run the following PHP code, I get the error message and output below the code:
<?php
class FooBar {
const MESSAGE = "Hello world!";
public function foo() {
echo MESSAGE;
...
-2
votes
2
answers
2k
views
Simple C++ undefined reference error during linking while using a class
I've got a simple problem I think. But I am unable to solve it so far as I am new to C++ programming. I have created a new C++ project to make the code as short and simple as possible (because the ...