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.04 seconds.

  1. 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.
  2. 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> ...
  3. 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...
  4. Replies
    4
    Views
    411

    Re: how to export class with template

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

    IIRC, something like


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

    but shouldn't this be "spaces" or "blanks" instead of backspaces?
  6. 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"?
  7. Replies
    6
    Views
    429

    Re: Beginner- simple question

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

    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.
  9. Replies
    9
    Views
    744

    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.
  10. 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...
  11. Replies
    5
    Views
    645

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

    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:...
  13. 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.
    ...
  14. 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...
  15. Replies
    1
    Views
    308

    Re: Problem about file handling!!!

    ofstream file;
    file.open("text.dat", ios:app | ios::binary);
  16. Replies
    4
    Views
    742

    Re: Macro to template

    Google yields a list:
    http://www.google.com/search?q=using+namespace+in+header+file
    This post:...
  17. Replies
    66
    Views
    4,426

    Re: getting a binding error in server program

    http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html
  18. Re: ofstream writing replaces entire file with 0s

    ios::out erases an existing file. So if you open an existing file with that option, then seekp to a position, all bytes before that position are filled with 0x0.
    It's not Philip Nicoletti's...
  19. Thread: std::mutex

    by Richard.J
    Replies
    3
    Views
    1,424

    Re: std::mutex

    I only have g++ 4.6.1, but looking at /usr/local/include/c++/4.6.1/mutex it seems that the mutex class is protected by some #defines.
    I found a (german) article on the web which mentions that you...
  20. Replies
    5
    Views
    765

    Re: Struct member manipulation

    You might want to look up 'bitfields':
    http://msdn.microsoft.com/en-us/library/ewwyfdbe(v=vs.71).aspx
    http://en.wikipedia.org/wiki/Bit_field

    But be aware that the implementation is...
  21. Re: If someone can tell me why my program crash

    Did you use the debugger to debug your code?
    What if either con, stmt or res are nullptrs? The example relies on them not being nullptrs, but if they are, your program will crash as it does.
  22. Re: Unable to compile C lib of FatFS with C++ Project

    What compiler do you use?
    What error messages do you get?
  23. Re: giving one line command that prints lots of lines - ostream?

    must be "std::endl"
  24. Re: giving one line command that prints lots of lines - ostream?

    The quickest thing would probably be the use of a ostringstream


    #include <sstream>

    std::ostringstream os;
    os << "hello\n";
    os << "mike\n";
    os << "how\n";
    os << "are\n";
  25. Re: [Newbie] SIP parser and header-file including (using sofia-sip)

    You are most likely missing a header file where the struct/class/whatever sip_default_mclass is declared.
Results 1 to 25 of 1111
Page 1 of 45 1 2 3 4


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