comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
December 2007
motuwethfrsasuw
     12 48
3456789 49
10111213141516 50
17181920212223 51
24252627282930 52
31       1
2007
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c++ Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Timer Q         


Author: sip.address
Date: Dec 9, 2007 14:52

Hello,

I'm trying to find some existing (and simple if possible) timer queue
implementation. Does anybody know a simple skeleton to use as example?
I just need to send simple (relative) timeouts. Thought about some
possibilities but would prefer to use something already tested.

Thanksç
5 Comments
  Re: virtual destructor problem         


Author: Salt_Peter
Date: Dec 9, 2007 13:48

On Dec 9, 7:52 am, Rahul yahoo.co.in> wrote:
> On Dec 9, 5:47 pm, Abhishek Padmanabh gmail.com>
> wrote:
>
>
>
>> On Dec 9, 5:34 pm, Rahul yahoo.co.in> wrote:
>
>>> On Dec 9, 5:16 pm, lmf...@yahoo.com wrote:
>
>>>> Hi all,
>
>>>> I've hit the wall with this "fairly" simple problem. As you can see in
>>>> the code below, my destructors don't do their job as they are supposed
>>>> to (I left them empty for this example). I'm running the Visual Leak
>>>> Detector library (on VS 2005) to detect memory leaks and whatever I've
>>>> tried it still complains..
>
>>>> Please can someone help me clean up properly?
>>>> -------- ...
Show full article (2.69Kb)
1 Comment
  Help         


Author: babakandme
Date: Dec 9, 2007 12:57

Hi,
is there any body...?

I think that there is problem, cause I see in the discussion page, 3
messages about this article, but when I click on it, there is just my
original message...

I appreciate for your help:D
no comments
  Deriving from StreamBuf - input buffer         


Author: Christopher Pisz
Date: Dec 9, 2007 12:29

I found an article
http://spec.winprog.org/streams/
as a starting point, but it seems to do alot of things that aren't very
standard at all. One particular problem is, that he is using a vector as his
input buffer and trys to assign an iterator to a char pointer.

...
class winzoostreambuffer : private LoggerConsole, public
sts::basic_streambuf>
...
int winzoostreambuffer::uflow()
{
char c;

// GetInput() returns a char from a custom console device
while( c = GetInput() != '\n' )
_inputbuffer.pushback(c);

_inputbuffer.push_back(c);
_Pbeg = pCur =0, _PLength =0;
Show full article (0.95Kb)
5 Comments
  How to make a CString to 2 lines?         


Author: Donos
Date: Dec 9, 2007 11:32

I have a CString with 100 characters. Now i want to make that to 2
lines.

For example,

CString str = "This is just a test to find out how to break a
cstring";

I want this CString in the following format,

CString str1 = This is just a test to find
out how to break a cstring

ie, it should come in 2 lines.

I tried using line break (\n). But that doesn't work.

This was the code that i used.,

CString str = "This is just a test to find out how to break a
cstring";

int i = str.GetLength();

CString str1 = str.Left(i/2);

str1 += '\n';

str1+= str.Right(i/2);

str = str1; // But this is not working. It's not coming in 2 lines.

Is there any other way i can do this?
7 Comments
  How can I send "this" pointer to another Instantianted class...         


Author: babakandme
Date: Dec 9, 2007 11:14

Hi to every body...:D
I'm a novice C++ programmer & I've a question,

I have the ClassA & in it's constructor, I instantiate ClassB, and I
want send "this" pointer """pointer to ClassA""" to the ClassB.

But I get this Error from the compiler: and it's in ClassB...
Error from the compiler:
error C2061: syntax error : identifier 'TestA'
error C2143: syntax error : missing ';' before '*'
error C2501: 'TestA' : missing storage-class or type specifiers
error C2501: 'tA' : missing storage-class or type specifiers

//===========================================================
// TestA.cpp
#include"TestA.h"
#include"TestB.h"
class TestA
{
public:
TestA(){ tB = new TestB; }
~TestA(){ delete tB; }
Show full article (1.31Kb)
6 Comments