🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.upgrade
7 messages
7 total messages Started by Kresten Tolstrup Tue, 07 Dec 2004 13:50
Updated to c++ builder 6.0
#662
Author: Kresten Tolstrup
Date: Tue, 07 Dec 2004 13:50
10 lines
1079 bytes
Hi

I have updated from builder 4.0 to builder 6.0. I use string from the STL lib, but in 6.0 the string is empty. If I write: 
string s;
s= "12345";
and run the code and inspect s, then s is empty, do I need to set a flag or something ?

Beforehand thank you.
Kresten
Re: Updated to c++ builder 6.0
#663
Author: Ed Mulroy [TeamB]
Date: Tue, 07 Dec 2004 17:37
18 lines
1701 bytes
'string' is a class, not a native array.  The class contains
many elements, one of which is a pointer to the array of
information that you are looking for.  To see the characters
in the array you would need to inspect or look at the
information at the address of the allocated array.

.  Ed

> Kresten Tolstrup wrote in message
> news:41b5b50d$1@newsgroups.borland.com...
>
> I have updated from builder 4.0 to builder 6.0. I use
> string from the STL lib, but in 6.0 the string is empty.
> If I write:
> string s;
> s= "12345";
> and run the code and inspect s, then s is empty, do I
> need to set a flag or something ?
Re: Updated to c++ builder 6.0
#664
Author: Kresten Tolstrup
Date: Wed, 08 Dec 2004 07:57
30 lines
1974 bytes
Hi 

Yes, but in builder 4.0 a string variabel could just be inspected as a normal variabel, i.e. mark the variabel and press Alt+F5 to se the value, how is this done in 6.0 ?

Thank you
Kresten

"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> wrote:
>'string' is a class, not a native array.  The class contains
>many elements, one of which is a pointer to the array of
>information that you are looking for.  To see the characters
>in the array you would need to inspect or look at the
>information at the address of the allocated array.
>
>.  Ed
>
>> Kresten Tolstrup wrote in message
>> news:41b5b50d$1@newsgroups.borland.com...
>>
>> I have updated from builder 4.0 to builder 6.0. I use
>> string from the STL lib, but in 6.0 the string is empty.
>> If I write:
>> string s;
>> s= "12345";
>> and run the code and inspect s, then s is empty, do I
>> need to set a flag or something ?
>
>
>
Re: Updated to c++ builder 6.0
#665
Author: Ed Mulroy [TeamB]
Date: Wed, 08 Dec 2004 16:01
25 lines
2090 bytes
With BCB version 4 the Standard Template Libary (STL) that
is used is from Rogue Wave.  With BCB version 6 the STL
used is from STLPort.  Their basic_string implementation is
different so the elements shown as data members of the
class are different.

To see the characters in the array you would need to inspect
or look at the information at the address of the allocated array.

I am not near the machine with version 6 on it right now (the
version on this machine is 4), so cannot do this for you.
Investigate the class data members shown in the inspect
window.  One of them should be a pointer to something which
contains the data.


.  Ed

> Kresten Tolstrup wrote in message
> news:41b6b402$1@newsgroups.borland.com...
>
> Yes, but in builder 4.0 a string variabel could just
> be inspected as a normal variabel, i.e. mark the
> variabel and press Alt+F5 to se the value, how is
> this done in 6.0 ?
Re: Updated to c++ builder 6.0
#666
Author: Alisdair Meredith [TeamB]
Date: Fri, 10 Dec 2004 20:39
14 lines
1379 bytes
Kresten Tolstrup wrote:

> Yes, but in builder 4.0 a string variabel could just be inspected as
> a normal variabel, i.e. mark the variabel and press Alt+F5 to se the
> value, how is this done in 6.0 ?

I use the 'fly-by' hint in the debugger to show me the value.  Hover
the mouse over any variable that is in scope, and you will see its
value.

std::string has a few members, but I believe the first is the actual
string representation itself, so it easy to spot and read.

AlisdairM(TeamB)
Re: Updated to c++ builder 6.0
#667
Author: Kresten Tolstrup
Date: Wed, 15 Dec 2004 09:17
17 lines
1573 bytes

>I use the 'fly-by' hint in the debugger to show me the value.  Hover
>the mouse over any variable that is in scope, and you will see its
>value.
>
>std::string has a few members, but I believe the first is the actual
>string representation itself, so it easy to spot and read.

Hi

If I use the 'fly-by' I get "sValue = {}", and sValue is not empty, and the program act as expected. If I highlight the variabel and press F5 I get the debug inspector, and the only text in it is:

sValue: _STLD::basic_string<char, _STLD::char_traits<char>, _STLD::allocator<char> > :0012FD28

Best regards
Kresten
Re: Updated to c++ builder 6.0
#670
Author: Alisdair Meredith [TeamB]
Date: Mon, 20 Dec 2004 09:38
15 lines
1570 bytes
Kresten Tolstrup wrote:

> If I use the 'fly-by' I get "sValue = {}", and sValue is not empty,
> and the program act as expected. If I highlight the variabel and
> press F5 I get the debug inspector, and the only text in it is:
> 
> sValue: _STLD::basic_string<char, _STLD::char_traits<char>,
> _STLD::allocator<char> > :0012FD28

Don't know what to say, as I don't get this behaviour.  Sorry.

Check you are running a full debug build on all libraries and the exe
project.  If that does not turn anything up, I am lost.

AlisdairM(TeamB)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads