Search:
Type: Posts; User: CppCoder2010
Search:
Search took 0.10 seconds.
-
December 29th, 2012, 02:07 PM
I wrote this code, I think it's all okay but I cannot even use it because the visual c++ 2010 express linker says that the file is corrupt.
I have attached the *.zip file to this post in hopes...
-
September 26th, 2011, 04:02 PM
#include <iostream>
int main(int argc,char * argv[])
{
char chInput = 0;
cin << chInput;
if ( (chInput >= 'A' && chInput <= 'Z') || (chInput >= 'a' && chInput <= 'z') )
{
-
August 30th, 2011, 10:29 AM
It's not just about the variables going out of scope, each thread has it's own stack and the params variable he creates is in the main thread. In order to access the variables in the newly created...
-
August 24th, 2011, 10:59 AM
std::string LeftTrim(const char * pString)
{
while (*pString == ' ')
{
++pString;
}
std::string retValue(pString);
-
July 29th, 2011, 02:15 PM
No, this is wrong. The *.dll has to be loaded once into every process address space. It is loaded only once if the *.exe and any amount of *.dlls used by the *.exe use the same *.dll. That's loading...
-
July 27th, 2011, 11:02 AM
Paul is right. If you use the address of operator you are passing a pointer which is by value to the function.
You pass by reference doing the following.
void Function1(int & x)
{
//...
-
July 22nd, 2011, 03:35 PM
A pointer is just what it sounds like, a pointer to a place in memory.
If you declare an integer like below.
int value1 = 0;
You have an integer variable. If you declare a pointer to...
-
July 20th, 2011, 03:56 PM
Okay, so they are POD types, but they are just not safe to dump the contents of the structure to memory or file straight up.
-
July 20th, 2011, 03:48 PM
Most of the time I see you to be right 100% Paul, but you said that 'C' has nothing but POD types. I thought POD types also required that there be no pointers as member variables too?
So, 'C' has...
-
January 27th, 2011, 04:28 PM
Since you are using Windows, you can use the performance counter.
#include <windows.h>
#include <iostream>
unsigned long long GetPerformanceTicks();
unsigned long long...
-
How large is the range of numbers you are generating? If the range of numbers you are generating are small to medium, maybe a bit array as boolean flags denoting if a number has been generated...
-
Here's an example of where using a header would be useful.
struct FileHeader
{
unsigned long FileID; // The type of file so you can recognize if it's valid data
unsigned short...
-
Time slices here are also critical in determining which function is faster. I've written a function in C++ for YourFunction() defined as follows.
Also, the frequency returned from...
-
-
Are you asking about the virtual function table or the size of the class?
As stated before, the hidden VTable pointer only points to a data structure that holds the pointers to the virtual...
-
I typically don't use defines for much, however I have had a few cases where they have been useful.
In C++ (not C) enums do not have automatic intrinsic bit operators, so I defined a macro that...
-
April 23rd, 2010, 07:16 PM
A few things. As stated before, if using CreateWindowEx your CHILD windows will get the WM_CREATE message.
Also, there is a more elegant function to use for storing window data properties, has...
-
April 20th, 2010, 10:13 PM
Shouldn't IconInfo be a value struct? Also, shouldn't you declare the following:
[DllImport("user32.dll")]
static bool GetIconInfo(IntPtr hIcon, IconInfo^ pIconInfo);
// as
...
-
April 16th, 2010, 01:06 PM
If you are only looking for a range of integral values "existence" or "flag", you can use a bit array to store the "boolean bit flags", there's no need for a full blown hash table.
class...
-
April 16th, 2010, 12:06 PM
void GetTextAndDoSomething(HWND hWnd)
{
// get the length of the text
const int nTextLength = ::GetWindowTextLength(hWnd);
// allocate a buffer for the text
char * pData = new...
|
Click Here to Expand Forum to Full Width
|