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


Type: Posts; User: code_carnage

Page 1 of 11 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: Implementing single threaded asynchronous TCP server

    I am getting the feeling that, one thread is spawn internally for accepting connections and main thread is for processing those connections, that makes it total two threads, correct me if I am...
  2. Implementing single threaded asynchronous TCP server

    Hello Guys,
    I need help in implementing asynchronous single threaded TCP server using boost asio.. Any example or link will be highly appreciated..

  3. std::for_each is not compiling with boost::algorithm::to_lowe

    Do you guys know why this does not compile?
    std::for_each(v.begin(), v.end(), &boost::algorithm::to_lower<string>);
    v is a vector of strings that I want to convert to...
  4. Re: Inheritance and Implementation hiding..

    Thanks man..Thats what even I concluded..
  5. Re: Inheritance and Implementation hiding..

    [quote=JohnW@Wessex;1998544]You'd be better with something like this.

    class BASE
    virtual bool isEqual(const BASE& rhs) const = 0;

    class Derived: public BASE
  6. Inheritance and Implementation hiding..

    Hello Guys,

    I have to implement a class BASE which is abstarct and has a function called isEqual which ofcourse checks for equality..

    Now isEqual has to be pure virtual.

    Now bunch of derived...
  7. Replies


    Anybody have any idea why this is the signature.

    size_t copy ( char* s, size_t n, size_t pos = 0) const;

    of std::string.copy function.

    I mean why char* s should it not have been...
  8. Accessing and changing elements in a std::set

    class TestClass
    TestClass(string name, string profession): _name(name), _profession(profession)
    bool operator <(const TestClass& testClass) const
  9. Re: Why g++ fails to find correct overload in this case?

    Compilar is looking for a overload in the class, which it does not finds.
    and errors out..Because you can not over load a member function with a global function..
  10. Re: Why g++ fails to find correct overload in this case?

    Use this...

    ::write_binary( n, f );
  11. Replies

    Re: A Design problem

    1. If I was to design, I would not keep data member in Abstract Class, which is Item.

    2. I will keep class hierarchy something different, and not based on Item but based on type.

    For example...
  12. Replies

    Re: Copy Constructor.

    What is tthis doing in your code?

    delete [] this->dataptr;

    1. Role of constructor is to initialize and not destruct....
  13. Replies

    Re: Inheritance problem

    First thing..
    Why following does not work?


    because here c+d will return object of type A.
    While c is object of type B.
  14. Re: how to detect NULL bytes in a char array ?

    If you have to find whether there is a NULL.

    You could do soemthing like the following..

    char buffer[1000000] = {'\0'};
    bool detected = strlen(buffer) < 1000000;
    I think...
  15. Re: An Object Oriented Question about C++

    Thats called constructor initialization list.
    This will ensure that all the data member are initialized before you hit constructor body.

    If you dont do that, all the data mambers will be...
  16. Replies

    UTF8 length calculation

    Hello guys,
    I am trying to write a code to find out no of characters in a multibyte UTF8 encoded string.

    #include <stdlib.h>
    #include <iostream>
    #include <sstream>...
  17. Replies

    Re: Constructor initialization problems

    So what is the problem?

    Moreover, if you passing big vectors around..Better use reference to pass around Vectors..
  18. Re: does c++ map find function support multithreading?

    >>Unless the write operation is atomic.

    And how could it be atomic in STL map..?? Ofcourse when not properly synchronized...
  19. Replies

    Re: Attempting better multithreading design

    All I can say is revisit your design..

    With this current design you can hardly do much.
  20. Replies

    Re: Locking An Entire Class

    See...Your threads must be running on some condition...

    something like this..

    void svc()
    //do something.
  21. Replies

    Re: Access private function

    No No..

    Here you are exposing RunIt just as a test hook. I want no test hook.

    If you do that any production code could define RunIt and will start accessing private data/member function.
  22. Replies

    Access private function

    Hello Guys,

    I want to access private function from outside of the class..
    I know its not allowed. But the thing is I need to test private function.

    I need some kind of hack, because its not a...
  23. building using shell file is giving error

    Hello Guys,

    I am facing a strange problem.

    My shell file contains

    g++ -o Client *.cpp -I ../ace5.5.static -lACE -L ../ace5.5.static/ace
  24. Re: how to convert a string to a class name ?

    And now what I am gonna do with void* obj..? KHI KHI KHI KHI...:):)
  25. Re: how to convert a string to a class name ?

    yup...Common base class is nessessary in that case..
Results 1 to 25 of 274
Page 1 of 11 1 2 3 4

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center