conflicting with my own String.h

前端 未结 6 587
无人共我
无人共我 2020-12-19 01:52

I have a project that was compiling ok within g++(I can\'t see the version right now) and now on xCode it is not.
I think that I got the problem now... I have a String.h

6条回答
  •  忘掉有多难
    2020-12-19 02:39

    it worked by changing the name from String.h to Text.h

    but that makes no sense, since the std library is including it's own string.h and not mine.
    I mean, makes no sense for a developer to create his files thinking of what names he can't use, for an instance, lets say I change my String.h to Text.h(I already did, I need to work and this is not letting me) ad somehow I had to include another templated library that has a include called Text.h, would I have to change my text.h again or not use this new library? there should be an alternative.
    Or shouldn't it?

    thanks for the help so far,
    Jonathan

提交回复
热议问题