Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: CppCoder2010

Search: Search took 0.01 seconds.

  1. Replies
    0
    Views
    457

    I'm having linking problems...

    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...
  2. Replies
    4
    Views
    710

    Re: really need your help

    #include <iostream>

    int main(int argc,char * argv[])
    {
    char chInput = 0;

    cin << chInput;

    if ( (chInput >= 'A' && chInput <= 'Z') || (chInput >= 'a' && chInput <= 'z') )
    {
  3. Replies
    5
    Views
    994

    Re: CreateThread and few arguments

    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...
  4. Replies
    13
    Views
    985

    Re: Left trim a char*

    std::string LeftTrim(const char * pString)
    {

    while (*pString == ' ')
    {
    ++pString;
    }

    std::string retValue(pString);
  5. Replies
    4
    Views
    1,282

    Re: C++ Library Loading

    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...
  6. Replies
    17
    Views
    1,622

    Re: looking for a good pointer info

    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)
    {
    //...
  7. Replies
    17
    Views
    1,622

    Re: looking for a good pointer info

    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...
  8. Re: Write file of base objects into vector of derived objects

    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.
  9. Re: Write file of base objects into vector of derived objects

    Most of the time I see you to be right 100&#37; 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...
  10. Replies
    4
    Views
    3,625

    Re: C++ Tick timer

    Since you are using Windows, you can use the performance counter.



    #include <windows.h>
    #include <iostream>

    unsigned long long GetPerformanceTicks();
    unsigned long long...
  11. Replies
    3
    Views
    676

    Re: Random number generator

    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...
  12. Replies
    7
    Views
    746

    Re: learning binary files.

    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...
  13. Replies
    40
    Views
    3,227

    Re: Data Type Conversion

    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...
  14. Replies
    40
    Views
    3,227

    Re: Data Type Conversion

    Consider though...
  15. Replies
    9
    Views
    1,598

    Re: Virtual Function Pointer Table

    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...
  16. Replies
    13
    Views
    3,619

    Re: #define vs const - where to use #define?

    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...
  17. Replies
    2
    Views
    802

    Re: Child windows and OOP

    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...
  18. Re: Managed C++ call Win32 Api with managed data

    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
    ...
  19. Re: check if a variable is inside a set of values

    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...
  20. Replies
    3
    Views
    2,257

    Re: Get text from textbox

    void GetTextAndDoSomething(HWND hWnd)
    {
    // get the length of the text
    const int nTextLength = ::GetWindowTextLength(hWnd);

    // allocate a buffer for the text
    char * pData = new...
Results 1 to 20 of 20


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center