No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
8 Posted Topics
I am using visual C++ 2005(native C++) I got the error error C2065: 'CString' : undeclared identifier for the following code, [CODE]#include <cstring> using namespace std; int main(){ CString ab; ab="a"; }[/CODE] what is the problem? | |
I am using Visual Studio 2005. Following two programs has the same code, just that one is CLR Console application and the other is Win32 Console application. I set a break point at int i=1 for both program, for CLR Console application, and when run to the break point, in … | |
In java we can use System.out.println In C# we can use Debug.Println but how to do it in C++? (The syntax, and where to look for the debug message) | |
I am using Visual C++ 2005 (native C++) For the following code, the different of main function 1 and main function 2 is main function 1 using }catch(MyException &e){ but main function 2 using }catch(MyException e){ Which is more correct? if both are correct, which is better? [CODE]//========This is MyException.h===== … | |
I have seen SubclassDlgItem() at [url]http://functionx.com/visualc/controls/bmpbtn.htm[/url] It mentioned "The suggestion is to "subclass" your button class so the messages sent to the bitmap button would be applied effectively." I am not very clear with this statement...thus I go and find msdn [url]http://msdn.microsoft.com/en-us/library/0wx11zk9(VS.80).aspx[/url] but still not very clear. My question is … | |
I have seen a lot of type LPSTR(and other like LPCSTR, etc) when coding using MFC. I just know it is equivalent to char*, but what LPSTR exactly is? (ie, is it a native type in C++, or a macro in C++, or a typedef in C++, or...) | |
Consider the following two cases: CCandyBox obj; str will be pointing to "Candy" May I know "Candy" is on heap or stack? If it is on heap, is the delete[] str; //delete the Candy to avoid memory leak line below necessary? [code]CCandyBox(char* str = "Candy") // Constructor { if (str … | |
Is this two ways of instantiating class both acceptable?(My intention is to create CBox on stack instead of heap) CBox a=CBox(1); CBox b(2); Definition of CBox is as followed: [CODE]class CBox { public: int abc; CBox(int var){ abc=var; } };[/CODE] |
The End.