I’m consolidating 2 programs into one, and in 2 different files (I have many files), I have a typedef with the same name, different types though.
These types will be used in completely different parts of the program and will never talk to each other, or be used interachangely.
I can of cause just do a search replace in one of the files, but I was wondering if there is another solution to this.
Something like binding a typedef to a specific file.
Or making a typedef local to a class and it’s subclasses.
Thanks
You can encapsulate those
typedefinside anamespace:And in whatever file you want to use first
typedefsimply declare:same thing for the other one also.