Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Need to find all string compares in scores of projects(Fixing C++ string compares)
Need to find all string compares in scores of projects [message #1400804] Mon, 14 July 2014 18:44
website reader3 is currently offline website reader3Friend
Messages: 4
Registered: July 2014
Junior Member
This morning one of my programs did a C++ string compare on two unequal strings (one was a function parameter input) and found that they (much to my surprise) were equal, the equality operator == was being used.

Some careful reading uncovered that using == to compare strings has quirks and using == on char* (properly terminated by the \0 character) was a good way to go.

I would like to find all string compares in my 78 projects and convert them to char* compares, but the only thing I can find is using some Eclipse java add-on which does this.

Is there anything for Eclipse C++ which can locate a string compare using the equality == operator?

Thanks for sharing a robust method (if it exists) I did go manually through all my code attempting to do this, but I might have overlooked one or two which could still be a bug in the program module. (and yes, this bug caused the program to do strange things such as return negative integers to the mod operator)

Previous Topic:How to permanently highlight an arbitrary block of code?
Next Topic:With which files does Eclipse start to compile and how to change it
Goto Forum:

Current Time: Sat May 26 05:44:45 GMT 2018

Powered by FUDForum. Page generated in 0.01886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top