Hi,
In have finished a project in C++, in that i have written a class Utils.cpp as given below
After everything is done, while testing the project, i am getting some wired results while accessing this class functions. Later i came to know that in Multi-threaded environment these static functions are not shared, it is not safe to use static functions in multi-threaded application without synchronization in C++.
So now anyone can suggest a solution to this. Also i have used this class extensively in my project almost in 400 places, so i cannot make these functions as normal functions and create object for this class at each place and use them. Is any one has some better solution than this? pls help me.
In have finished a project in C++, in that i have written a class Utils.cpp as given below
Code:
class Utils
{
public:
static int stringToInt(std::string);
static float stringToFloat(std::string);
//Many more Generalized functions like this
}
So now anyone can suggest a solution to this. Also i have used this class extensively in my project almost in 400 places, so i cannot make these functions as normal functions and create object for this class at each place and use them. Is any one has some better solution than this? pls help me.
Comment