User Profile
Collapse
-
well what I'm saying basically is when do you define a destructor as virtual besides in inheritance and for the base class.... -
When to define a virtual destructor
Hello people,
I know that in a base class you should define the destructor as virtual but is there any cases that you define a destructor as virtual. In the case when you implement assignment operator and copy constructor you need to implement the destructor as well but does it need to be virtual too or not?
many thanks -
-
How to format decimal numbers
Hi guyz,
could anyone please tell me how can I convert an integer variable like 1 to a string variable but with this format 00X where x is the number, I mean like let's say I want to have a string with fixed size (let's say 3) and I want to convert an int variable into that string but if the int variable is less than 100 I want it to have 0s before that so 1 -> 001 and 10->010
Regards, -
How to convert array of floats to string
Hi guyz,
Could anyone please tell me how can I convert an array of floats to a string? I know that I can use this code to convert one float to a string but what is the best way for an array of floats
Code:ostringstream stream; float a = 3.14156; // set the significant digits stream.precision(2); // by using fixed we specify the number of digits after decimal point. stream
-
-
Tnx for the reply, so u mean it's easier if I use ODBC? what about performance?...Leave a comment:
-
Pointer to Pointer
Hi guyz,
could you please tell me what's the use of pointer to a pointer? specially in function parameters.
Regards, -
Should I use ODBC?
hi everyone,
I'm implementing an application which is kind of a client-server type, there are some data on server located on a database, the format of the database is not defined yet, I mean it could be XML or SQL server or MySQL, the client application should connect to the server and fetches some data from the server and display it on its UI, no browser or webclient is used here, so what are you guyz suggesting, should I use something like... -
well I use Windows XP and VS2005 and I don't have any problem about compiling or linking my application, all I want is a tool which automatically reviews the code based on some rules and shows me for instance if I have any unused variable or anything like that...Leave a comment:
-
hi, tnx for the reply, well I meant a tool which review your code so for instance you can find if you have any unused variables or uninitialized variables or even better if you can define your own rules....Leave a comment:
-
c++ code review tool
Hi guyz,
Do you have any suggestions for a good and free c++ code review tool.
Regards, -
How to use a dll in vs 2005 c++
hi everyone,
I want to use xerces-c++ library to create a xml parser in c++ but my question is generally how should I set the references for a dll in c++, let's say I have "inc" folder for include files, "lib" folder for lib files and "bin" folder for .dll files.
Regards, -
Virtual Destructor
Hi everyone,
I have a class hierarchy with A as the base class, then I have another class B which inherits from A and another class C which inherits from B. so A<--B<--C. I have a method "Read" define in all three classes, but it's only virtual in A and B and not C. I only define A's destructor as virtual but now B and C. My question is should I define B's destructor as virtual too or not.
Regards, -
Hi Christoph,
tnx for your reply, but could you please tell me where can I set the dll files location in VS 2005....Leave a comment:
-
How to import a dll
Hi everyone,
could you please tell me how can I import a dll into my C++ project, I'm using VS 2005 and I want to use xerces to parse XMLs and I can build its project so I have .Lib and bunch of dlls. but I don't know how to use them in my project.
Regards,
No activity results to display
Show More
Leave a comment: