Search:
Type: Posts; User: code_carnage
Search:
Search took 0.03 seconds.
-
January 12th, 2012, 04:49 AM
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...
-
January 12th, 2012, 02:56 AM
Hello Guys,
I need help in implementing asynchronous single threaded TCP server using boost asio.. Any example or link will be highly appreciated..
Thanks
-Prashant
-
November 21st, 2011, 01:45 AM
Hello,
Do you guys know why this does not compile?
<code>
std::for_each(v.begin(), v.end(), &boost::algorithm::to_lower<string>);
</code>
v is a vector of strings that I want to convert to...
-
February 18th, 2011, 05:40 AM
Thanks man..Thats what even I concluded..
-
February 18th, 2011, 05:39 AM
[quote=JohnW@Wessex;1998544]You'd be better with something like this.
class BASE
{
public:
virtual bool isEqual(const BASE& rhs) const = 0;
};
class Derived: public BASE
-
February 18th, 2011, 12:42 AM
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...
-
July 19th, 2010, 01:38 AM
Hello,
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...
-
class TestClass
{
public:
TestClass(string name, string profession): _name(name), _profession(profession)
{
}
bool operator <(const TestClass& testClass) const
{
...
-
April 5th, 2010, 04:00 AM
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..
-
April 5th, 2010, 03:58 AM
Use this...
::write_binary( n, f );
-
April 5th, 2010, 02:31 AM
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...
-
March 31st, 2010, 06:39 AM
What is tthis doing in your code?
delete [] this->dataptr;
size=source.size;
dataptr=0
1. Role of constructor is to initialize and not destruct....
-
March 31st, 2010, 06:33 AM
First thing..
Why following does not work?
c=c+d;
because here c+d will return object of type A.
While c is object of type B.
-
March 31st, 2010, 06:24 AM
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...
-
March 31st, 2010, 06:20 AM
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...
-
March 22nd, 2010, 04:01 AM
Hello guys,
I am trying to write a code to find out no of characters in a multibyte UTF8 encoded string.
#include<stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>...
-
December 27th, 2009, 12:08 PM
So what is the problem?
Moreover, if you passing big vectors around..Better use reference to pass around Vectors..
-
November 16th, 2009, 04:56 AM
>>Unless the write operation is atomic.
And how could it be atomic in STL map..?? Ofcourse when not properly synchronized...
-
November 16th, 2009, 04:53 AM
All I can say is revisit your design..
With this current design you can hardly do much.
-
November 16th, 2009, 04:48 AM
See...Your threads must be running on some condition...
something like this..
void svc()
{
while(isRunning)
{
//do something.
-
October 22nd, 2009, 04:55 AM
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.
-
October 22nd, 2009, 04:33 AM
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...
-
July 15th, 2009, 03:45 PM
Hello Guys,
I am facing a strange problem.
My shell file build.sh contains
g++ -o Client *.cpp -I ../ace5.5.static -lACE -L ../ace5.5.static/ace
-
June 24th, 2009, 08:52 AM
And now what I am gonna do with void* obj..? KHI KHI KHI KHI...:):)
-
June 24th, 2009, 06:35 AM
yup...Common base class is nessessary in that case..
|
Click Here to Expand Forum to Full Width
|