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

Search:

Type: Posts; User: harizak

Page 1 of 9 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    15
    Views
    3,355

    Re: Char arrays,whats wrong

    How about this:



    const char* table[] = { "one", "two", three" };


    In your code you declare 'table' as an array (indicated by the [] on the right hand side of the 'table' variable) of char...
  2. Replies
    6
    Views
    2,153

    Re: Non blocking accept call

    Since we've been talking about accept(), I assume that you are using reliable connection oriented sockets (TCP/IP) and not unreliable connectionless (UDP) ones. The TCP stack allocates two internally...
  3. Replies
    6
    Views
    2,153

    Re: Non blocking accept call

    Your problem is rather simple. Before calling accept() -which by the way is a blocking call- issue a call to the select() as follows:




    int Accept (int s,struct sockaddr* addr, socklen_t*...
  4. Replies
    6
    Views
    940

    Re: I wonder how, I wonder why

    How about this (instead of the switch statement):



    bool Nessica (char c)
    {
    return (c == 'e');
    }
  5. Replies
    10
    Views
    2,830

    Re: changing MAC address of NIC card

    Really interesting! I guess you have (at least partially) resolved your problem. Still need to find how the various registry values are propagated into the OS' network configuration (without a...
  6. Re: Problems with functor object ( design extension)

    When you are talking about variable number of parameters, do you mean that the method signature will contain the varaible arguments notation '...' or something else?

    There are for example...
  7. Replies
    10
    Views
    2,830

    Re: changing MAC address of NIC card

    Unfortunately we are talking about the very same thing. The advanced sheet is not windows specific. Windows simply render the driver's advanced dialog window. The advanced sheet (at least for my NIC)...
  8. Replies
    10
    Views
    2,830

    Re: changing MAC address of NIC card

    When I click on the configure button of my NIC properties sheet, I do not see a windows standard dialog. I see an Intel (my NIC's vendor) specific dialog, containing a property sheet that does not...
  9. Replies
    10
    Views
    2,830

    Re: changing MAC address of NIC card

    I don't think that Windows let you change the MAC address of any NIC. Are you sure that the configuration button does not pass control to the HP confiuration tool? At least on my PCs (WinNT 4.0 &...
  10. Thread: Please help

    by harizak
    Replies
    1
    Views
    467

    Re: Please help

    Seems ok as long as REGS and SREGS have already been defined. If you are working on a Win32 platform and you are getting a strange (unexpected) error, verify that REGS and SREGS are not defined as...
  11. Replies
    10
    Views
    2,830

    Re: changing MAC address of NIC card

    To my knowledge, the MAC address is something built into the "hardware" part of NICs and cannot be altered by users at the user level. Of course hardware provides means to the driver so that all...
  12. Re: how to check if two path points to same file?

    Win32: Open both files and then call the GetFileInformationByHandle(...). The 2nd parameter (BY_HANDLE_FILE_INFORMATION) will contain a unique index for each file (within a file system). If this...
  13. Re: Problems with functor object ( design extension)

    I'm affraid but variable parameter method invocation requires assembly. The functor needs to perform the following actions:

    1) Discover the size occupied on the stack by the variable number of...
  14. Replies
    4
    Views
    1,205

    Re: folder size limitation

    I am affraid that no portable solution to your problem exists. Before explaining my approach, let me clarify one or two things:

    1) Folder are files too (of directory and not ordinary type). The...
  15. Thread: structs

    by harizak
    Replies
    18
    Views
    1,804

    Re: structs

    Well NoHero, even the function specialization trick will not be enough. Here comes an example:




    // The original 'MyStruct' structure.

    struct MyStruct
    {
    int count;
  16. Replies
    4
    Views
    1,205

    Re: folder size limitation

    Windows or UNIX platform?

    --harizak
  17. Replies
    7
    Views
    1,478

    Re: typedef on a template?

    Well, I also don't like that much the proposed decoupled typedef-ed template specification. However, in your case the introduction of a lightweight variant class may be a solution to your problem....
  18. Re: Create empty string function – does it contain a bug?

    The "" is an empty literal constant,which occupies 1 char (usually 1 byte) of read-only memory and contains nothing more that the null terminator character. Your function returns a pointer to this...
  19. Thread: structs

    by harizak
    Replies
    18
    Views
    1,804

    Re: structs

    Well NMTop40, it is not actually that simple. The specialization won't be effective for classes derived from the abstract 'Counter' class but only for 'Counter' instances (that is for nothing since...
  20. Thread: structs

    by harizak
    Replies
    18
    Views
    1,804

    Re: structs

    Indeed! Avoiding to use the base initializer list, will cause the compiler to emit code for default initialization of all base classes and member fields, as also for the required assignment...
  21. Thread: pointer = null

    by harizak
    Replies
    10
    Views
    1,643

    Re: pointer = null

    Got it (actually google got it for me)! I knew I've come across a "multiply invoked destructor" compiler bug ...

    Visual C++ v5
    EGCS (Alpha platform)

    The version 6 of the visual C++ compiler...
  22. Thread: structs

    by harizak
    Replies
    18
    Views
    1,804

    Re: structs

    Constructors are used in order to have a class instance (an object) initialized upon creation. By default, all base classes and member fields (variables) are initialized using their default...
  23. Thread: pointer = null

    by harizak
    Replies
    10
    Views
    1,643

    Re: pointer = null

    To be honest I don't remember where have I read about the multiple destruction issue. I suppose it was either in this forum or somewhere in the code project site. It is for me as well hard to believe...
  24. Thread: structs

    by harizak
    Replies
    18
    Views
    1,804

    Re: structs

    // Sample C-style structure (without constructors etc.)

    struct MyStruct
    {
    int count;
    };


    // Templatized Foo class.
  25. Replies
    6
    Views
    8,342

    Re: How to compare two IP Addresses ?

    I am affraid that the above code fragment will not work on little endian architectures (such as intel CPUs etc), since endianity is not taken into account. Try the following instead:



    UINT...
Results 1 to 25 of 206
Page 1 of 9 1 2 3 4





Click Here to Expand Forum to Full Width

Featured