Questions tagged [redefinition]
276 questions
9
votes
3 answers
What if redefine an inline function?
I've spent days in a weird problem and finally discover that there were two inline function of the same signature in the project and they caused the problem. To simplify the situation here is an example: two cpp file:
a.cpp
#include
void…

neuront
- 9,312
- 5
- 42
- 71
9
votes
3 answers
PowerShell - How do I call a cmdlet in a function when overriding that cmdlet's name with the same name as the function?
So I have a cmdlet named update-name that I have no access to change.
I have created a function named update-name (the same name as the cmdlet). How do I call the cmdlet from the function with the same name?
I've tried a few things and none of…

ferventcoder
- 11,952
- 3
- 57
- 90
8
votes
4 answers
C++ Error message redefinition of functions
I am using two stacks to implement a queue class. My header file looks like:
#ifndef _MyQueue_h
#define _MyQueue_h
using namespace std;
template
class MyQueue {
public:
MyQueue();
~MyQueue();
void enqueue(T element);
…

Hayden Coyle
- 81
- 1
- 1
- 2
7
votes
3 answers
How could I redefine a subroutine and keep the old one too?
Here's what I'd like to achieve:
sub first {
print "this is original first";
}
*original_first = \&first;
sub first {
print "this is first redefined";
}
original_first(); # i expect this to print "this is original first"
first() # i…

Geo
- 93,257
- 117
- 344
- 520
7
votes
3 answers
C++ class redefinition error - Help me understand headers and linking
I started writing a simple interpreter in C++ with a class structure that I will describe below, but I quit and rewrote the thing in Java because headers were giving me a hard time. Here's the basic structure that is apparently not allowed in…

ICoffeeConsumer
- 882
- 1
- 8
- 22
7
votes
5 answers
redefinition of template in C++
I have searched and searched for a solution to my problem but I cannot seem to find one. I am using Code::Blocks and I am getting a redefinition error of a template class.
Here is my "vectorAux.h" file:
#ifndef vectoraux_h
#define…

Vincent Giuliana
- 113
- 1
- 2
- 8
6
votes
2 answers
Why Javascript doesn't let a function redefine itself from within itself?
Consider the code:
window.a = function(x){
var r = x*2;
window.a =alert; // redefines itself after first call
return r;
};
a('2 * 2 = '+a(2)); // doesn't work. it should've alerted "2 * 2 = 4"
This doesn't…

Silviu-Marian
- 10,565
- 6
- 50
- 72
6
votes
1 answer
How to #define __forceinline inline?
I have some Microsoft code (XLCALL.CPP) which I am trying to compile with CodeBlocks/MinGW.
At this line I get a compile time error:
__forceinline void FetchExcel12EntryPt(void)
This is the error message I get:
XLCALL.CPP|36|error: expected…

Pietro M
- 1,905
- 3
- 20
- 24
6
votes
1 answer
Why "Redefinition of typedef" error with GCC 4.3 but not GCC 4.6?
I've been developing my application using GCC 4.6 for compilation but a user reported the "redefinition of typedef" error. After some confusion where I wrongfully told the user to fetch the latest source using Git, I took a closer look and found…

James Morris
- 4,867
- 3
- 32
- 51
6
votes
1 answer
Is it possible to redefine keywords in Python?
I ran into an issue wherein I had to jsonify everything that my API was set to return. As I was writing a decorator and applying it to every single method, a thought occurred to me:
"Can't I just overwrite the return keyword so that it performs…

Simon
- 855
- 9
- 24
6
votes
1 answer
Redefinition of module 'Firebase' in Swift 3
Earlier, I had tried to integrate firebase in Xcode project manually but couldn't add it successfully. So Now I tried integrating firebase with cocoa pod but it resulted in build fail.
There are two pods which I have installed
Firebase/core…

Vijay Pal
- 181
- 1
- 2
- 5
6
votes
2 answers
Difference between xs:redefine and xs:override in XML schema 1.1
What is the difference between and in XML schema 1.1. I've got two books on XML Schema in front of me and I still can't tell the difference. The only thing that I'm sure of is that both are pervasive and that…

Olumide
- 5,397
- 10
- 55
- 104
6
votes
1 answer
Definition of static member in objective-C and objective-C++
I have a difference when compiling objective-c source and objective-c++ source.
Here a declaration of Class1 and Class2 in test.h :
#import
@interface Class1 {
}
@end
@interface Class2 {
}
@end
Now, this is Objective-C…

TheFrancisOne
- 2,667
- 9
- 38
- 58
5
votes
3 answers
Redefinition error with multiple derived classes in the main
I have an Object base class, and I have several derived classes called Item, Person, and Location.
Because each of these are derived from Object I need to include Object.h in each of their header files, and I include all of the derived classes in my…

jasonaburton
- 2,941
- 7
- 34
- 48
5
votes
2 answers
Compiling a Schema containing redefinitions in C#
When reading a schema containing tags and trying to compile it using a schema set, I get this exception:
'SchemaLocation' must successfully resolve if
contains any child other than
I tried many workarounds…

jdehaan
- 19,700
- 6
- 57
- 97