[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(no subject)
From: |
Marcelo Dalmas |
Subject: |
(no subject) |
Date: |
Tue, 12 Mar 2002 09:30:59 -0300 (EST) |
Hi!
Is this the normal behaviour for Number? Should Number own internal
buffer or a string?
strcpy(buf,"123456");
Number n(buf, 6);
cout << "n() = " << n() << ". This should be 123456." << endl;
strcpy(buf,"654321");
cout << "n() = " << n() << ". This should be 123456." << endl;
delete buf;
n = 123;
cout << "n() = " << n() << ". This wrote in desallocated buffer." <<
endl;
Marcelo Dalmas
BRASMAP Sistemas
www.brasmap.com.br
Fone/Fax: (48) 333-2218 ramal 2114
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- (no subject),
Marcelo Dalmas <=