CString::Replace corrupts unicode strings hi, I have an application that manipulates strings. Its compiled without _UNICODE. I'm trying to do: mySrt.Remove('\r'); My problem is that although all \r are removed correctly, some characters are beening changed as well !! I don't read JP, but its clear that some letters had been change after this \r r... 1 May 2010 00:05
Performance of CString::Replace hi all, I have a huge application that does a lot of strings manipulations. Analyzing its performance, I have noticed that a lot of time is spend in CString::Replace. calls like : str.Replace("\n","\n\t"); or str.Replace("\r", "\0x00"); take lots of time. (25% of overall performance !!) How can I improve ... 26 Apr 2010 21:45
How do I run Form2, from Form1 ? Hello, I have a C++ Express 2008 program with two forms, Form1, and Form2. Form1 has a button, Button2, which has the method shown below. I would like to know what code needs to go into the method to run and show, Form2. private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e)... 30 Apr 2010 08:24
Template class usage I have a project that has a base class, inherited class and inherited class class CSession { public: BOOL Method1(); BOOL Method2(); }; class CHtml : public CSession { BOOL Method1(); BOOL Method2(); }; class CClient : public CHtml { BOOL Method1(); BOOL Method2(); }; I would like to In... 23 Apr 2010 11:49
.make file issues/ configuration parameters in headers Hi, I'm trying to #define a parameter like, #define MY_CONFIG_PARAM 0 in a header file, and then trying to check its value later (in the same header) #if $(MY_CONFIG_PARAM) != 0 #define SOMETHING_ELSE #endif and I need to do something similar in make files. In the Visual Studio environment (VS... 23 Apr 2010 11:49
Different speeds required for 2 simultaneous threads I just established 2 threads running concurrently in my application, and they run nicely... In my design, they should run at different speeds because of their specific types, say human and vehicle. I put pathfind(...) Sleep(500); when they finish an iteration. The threads seem to be running at the same sp... 22 Apr 2010 09:18
Thread Pool Performance in real-time applications Dear all, As my game application require more than 12 mobile units to do pathfinding at the same time, I wonder if I implement a thread pool (and that means to use a task queue for awaiting tasks) for those objects, would that really affect the overall performance of the application? ( I mean some objects would... 22 Apr 2010 09:18
memory fragmentation Giovanni Dicanio wrote: NianHawk wrote: would frequent allocation and release of small buffers definitely cause memory leaks? No, if you properly free every allocated buffer. My application have to allocate small buffer for sending data and then release it after it is done very frequently. I... 21 Apr 2010 19:51
Problem with Double::ToString(__,__) Hello, I have the following sequence of statements double MyDouble1; bool TryParseReturnValue; String ^ a = gcnew String("123.456"); TryParseReturnValue = Double::TryParse(a,MyDouble1); MyDouble1 += 1; a = Double::ToString(MyDouble1,IFormatProvider); // <---- error here I do not understand what I ... 21 Apr 2010 23:59
ReadEventLog fails with Error Code 87 Hi All, My application reads and displays system event logs. The ReadEventLog() API fails with the error code as 87 which means "The parameter is incorrect". Although all the parameters passed to the API are valid but still the failure. I came across the below link where microsoft has confirmed this behavior ... 21 Apr 2010 11:33 |