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

Search:

Type: Posts; User: Richard.J

Page 1 of 45 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    3
    Views
    247

    Re: read file content line by line

    What exception do you get?
    And why do you use 'new' for the file_mapping and mapped_region?
  2. Replies
    3
    Views
    267

    Re: identifier not found

    Thanks for correcting me, 2kaud.
    I just did a quick google without further reading when I spotted conio.h.
  3. Replies
    3
    Views
    267

    Re: identifier not found

    for clrscr/gotoxy, you need to


    #include <conio.h>

    and for this:


    file_ptr = fopen ( "C:\dict.anu", "r" );
  4. Replies
    2
    Views
    217

    Re: WSAStartup best practices?

    The online documentation of WSAStartup says
    "An application must call the WSACleanup function for every successful time the WSAStartup function is called. "...
  5. Re: How to initialize an array of DirectX9 Objects?

    I am not sure if I understand correctly.
    Say you have


    int *p = new int[3];

    This leaves you with a default initialised array which may contain any value, depending on the compiler, doesn't...
  6. Re: How to initialize an array of DirectX9 Objects?

    Is this

    not called "value initialisation" as opposed to "default initialisation" which, for POD types, does nothing at all?
  7. Re: Nonblocking connect and select() for writing

    Since the connect() call is done on the loopback address, the socket may seem to be connected immediately. I guess you would see a different behaviour using two different machines.
    I googled this:...
  8. Re: Reduction of the flash footprint

    Disabling exception handling (if/where possible) may save you another 8-10%.
  9. Replies
    1
    Views
    378

    Re: Data exchange between Clients in UDP

    This


    if( (master_socket = socket(AF_INET , SOCK_STREAM , 0)) == 0)

    creates a TCP socket, not an UDP one. Later on, you bind that socket to an address and listen on it.
    UDP sockets work a...
  10. Re: This guy adds another new std::vector container to itself

    If position is > vector.size(), the vector will throw an out_of_range exception.
  11. Re: Sending chat messages across different computers?

    It looks like your server is only listening on "127.0.0.1". You need to listen on any available address, or at least on a network address reachable from the outside.
  12. Re: How can I create a template method in a C++ class?

    This leaves you with a memory leak. The new Worker object is a temporary object you can never delete. Since you are not using it anyway, your method could be defined like this


    template<class T> ...
  13. Re: How can I create a template method in a C++ class?

    Apart from what OReubens suggested, I recommend not to return a raw pointer to the object, but a smart pointer. This relieves the caller of createObject from the question of the ownership of the...
  14. Replies
    4
    Views
    532

    Re: how to export class with template

    Is UTILITIES_EXPORT in your program defined correctly?
  15. Re: Backspaces in printf - formatting question

    IIRC, something like


    printf("%*s", countBackspaces, tmpString );

    but shouldn't this be "spaces" or "blanks" instead of backspaces?
  16. Re: Why Netbeans make use of Posix path style?

    While your PATH point to D:\mingw32\bin, your shell complains about "/D/mingw64/bin/make.exe", so maybe there is a colon missing after the "D"?
  17. Replies
    6
    Views
    567

    Re: Beginner- simple question

    In VS2010, it's "Debug - Start without Debugging" or Ctrl + F5.
    In other versions, it might be similar.
  18. Replies
    3
    Views
    1,095

    Re: A Server Side program in network

    A scalable server, this looks like a task for IO Completion Port. My first thought was about ::select(), but that cannot handle a large number of sockets, IIUC.
  19. Replies
    9
    Views
    1,007

    Re: problem with if and else if

    Did you run the program in the debugger? That should be pretty straight forward and show you what's going on.
  20. Re: directory name must immediately follow -I compile error

    Well, it tells you what's wrong:
    "error: directory name must immediately follow -I"
    This means that in your line
    g77-3.3 -I ./src/src_common_depend/
    there is one blank too much: between the I and...
  21. Replies
    5
    Views
    877

    Re: calculate dimensions of a circle in c++

    Yes, that's what I was thinking of, but didn't want to post because it is so simple.
  22. Replies
    5
    Views
    877

    Re: calculate dimensions of a circle in c++

    First of all, please use code tags when posting source code.

    Then, never place a "using" directive in a header file. For a discussion, see this link:...
  23. Re: Compiler says there is no constructor, but it does have one.

    Nope.
    It is most likely that the compiler does not know of the Idle class as it is defined after its first use in line 1. Moving the first line after the class definition should solve this issue.
    ...
  24. Re: winsock... binding to WRONG IP byte order WORKS!

    I think you are confusing two things:
    1. when setting up a connection, you always use the host byte order, because that is what is used internally on the system you are working on. It is the OS's...
  25. Replies
    1
    Views
    363

    Re: Problem about file handling!!!

    ofstream file;
    file.open("text.dat", ios:app | ios::binary);
Results 1 to 25 of 1121
Page 1 of 45 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center