Questions tagged [redefinition]
276 questions
0
votes
3 answers
(Redefinition error) Create multiple inherting classes from one baseclass in C++
Greetings oh mighty coders,
I am a beginner and in a bit of trouble here.
There is my baseclass (sensor.h):
class sensor
{
private:
int sensor_id;
string sensor_name;
string sensor_type;
float reading;
public:
sensor();
…

Cnewbie
- 23
- 2
0
votes
1 answer
How do I generally avoid redefinition warnings?
I'm kind of a newbie to macro definitions, that's why I generally want to know:
How do I avoid getting redefintion warnings?
I'm not sure if I'm correct but all I know is:
Macro defintions are made in header files. If I include several header files…

Pete Hilde
- 659
- 1
- 10
- 24
0
votes
3 answers
Redefinition of class types - c++
I understand the problem I'm having with my code, but trying some of the things that others are suggesting isn't fixing my error.
Here's my error messages:
In file included from proj07.driver.cpp:4:
proj07.string.cpp:10: error: redefinition of…

Megan Rose
- 23
- 1
- 3
- 5
0
votes
2 answers
Redefinition error: Different .h files using the same class name
I've created 2 header files. ListA.h and ListN.h
They both make their own use their own unique class List. When I compile my program (even though they have no way of knowing the other exists, it says the following error)
Im pretty sure it shouldnt…

Gunner Stone
- 997
- 8
- 26
0
votes
1 answer
Is it possible to include several header files that define complex structs with same names?
So I have several autogenerated files, each defines a complex struct with a unique name. They consists of some primitive types and structs.
Here is a little scheme of that two files. One car.h and one bike.h, each file defines the same struct…

CanO
- 111
- 1
- 4
0
votes
2 answers
as400 ILE C global variable multiple redefition
I have an ILE C projet on the as400 which, when being linked, gives me either an error of multiple redefinition of global variables or undefined references if I put the global variable extern.
Here is the code in its simplest form:
main:
#include…

aganm
- 1,245
- 1
- 11
- 30
0
votes
2 answers
Getting issues for redefinition of functions
I'm trying to scan numbers into 2 2D arrays, and I keep on getting the error of redefinition.
The code:
#include
#define N 3
void getMatrix(double mat[N][N]);
/*
char getMenuOption();
void getCoordinates(int*, int*);
void…

Eduard
- 11
- 5
0
votes
1 answer
Why does this 1-D array in python get altered / re-defined while being autocorrelated?
In python, I have the one 1-D array coef defined as follows:
coef = np.ones(frame_num-1)
for i in range(1,frame_num):
coef[i-1] = np.corrcoef(data[:,i],data[:,i-1])[0,1]
np.savetxt('serial_corr_results/coef_rest.txt', coef)
Now I want to do…

knut_h
- 303
- 2
- 3
- 11
0
votes
1 answer
How to fix redefinition warnings from CSS Validator?
I just ran my site through the W3C CSS Validator
and it came out with a total of 3146 warnings.
Most of them are redefinition warnings like these:
.fa.fa-check Redefinition of color
.fa.fa-check Redefinition of color
.fa.fa-check …

Jeanette Haugsdal
- 57
- 9
0
votes
0 answers
How to disallow redefining functions in javascript?
I have web page with such javascript: