473,807 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CStr() vs. .ToString()

Book I am reading says that Cstr() is best method for efficency and safety
however it doesnt compare that method of the .ToString() method.

Which is best.

Thanks
Feb 18 '06
101 19259
Just wondering... Have you ever contibuted anything positive to this
newsgroup? (or to anything else)
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:e6******** ******@tk2msftn gp13.phx.gbl...
Checking if a variable actually contains data before doing a convert .. is simply too much code.
You aren't serious, are you?
If you can avoid that it makes the code a lot better readable. You mean like the sentence above? I'm sure you meant "a lot more better
readablest".

Happy coding, pal.

Bob Lehmann

"Martin" <x@y.com> wrote in message
news:uu******** ******@TK2MSFTN GP11.phx.gbl...
Wow, what happened to put you in this mood?
Checking if a variable actually contains data before doing a convert to
upper case is simply too much code. If you can avoid that it makes the

code
a lot better readable.
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:ep******** ******@TK2MSFTN GP12.phx.gbl...
>>> You can't use the OO methods on a string that is "Nothing"
>
> Why would you want to?
>
> Oh, I get it, you're too lazy to check the data before performing an
> operation it. Isn't checking your data a 100 level concept?
>
> I'm guessing that On Error Resume Next is one of your friends too.
>
> Bob Lehmann
>
> "CMM" <cm*@nospam.com > wrote in message
> news:%2******** **********@TK2M SFTNGP09.phx.gb l...
>> I don't think that's true at all. First off, CStr,CBool, Etc. are all
>> just
>> easier-to-read specialized wrappers around CType..... which in and of
> itself
>> is a special "VB" construct. The true "non-VB" casting operator is
>> DirectCast(...) .
>>
>> Contrary to what Scott M says you're SUPPOSED to use them. What's the
> point
>> of using VB if you're not going to use its special methods that make

your >> life easier? This is straight from the VB documentation:
>>
>> "As a rule, you should use the Visual Basic type conversion functions in >> preference to the .NET Framework methods such as ToString(), either on
>> the
>> Convert class or on an individual type structure or class. The Visual
> Basic
>> functions are designed for optimal interaction with Visual Basic code,
>> and
>> they also make your source code shorter and easier to read. In addition, > the
>> .NET Framework conversion methods do not always produce the same results > as
>> the Visual Basic functions, for example when converting Boolean to
> Integer.
>> For more information, see Troubleshooting Data Types."
>>
>> In addition, although I'm a guy who always initializes strings and
>> objects
>> as soon as possible rather than have them sit around until my
>> algorithm
> uses
>> them- so I don't really care about the following- but, there's an
> advantage
>> to using VB's functions: they interpret "Nothing." You can't use the
>> OO
>> methods on a string that is "Nothing" (s.ToUpper for instance won't
>> work).
>>
>> --
>> -C. Moya
>> www.cmoya.com
>> "Scott M." <s-***@nospam.nosp am> wrote in message
>> news:O7******** ******@TK2MSFTN GP14.phx.gbl...
>> > IMHO (and this has been debated for quite some time now), you should
> view
>> > all of the old "data-type" specific functions as legacy functions
>> > and
>> > no
>> > longer use them. Instead, use the more object-oriented methods of a
> type.
>> >
>> > CStr, CBool, CDbl, CInt, etc. would all be replaced with CType or
>> > .ToString
>> > All date/time functions would be replaced with methods and
>> > properties
>> > of
>> > the Date class
>> > All string functions would be replaced with methods and properties
>> > of
> the
>> > String class.
>> >
>> > et all.
>> >
>> >
>> > "Sean" <Se**@discussio ns.microsoft.co m> wrote in message
>> > news:68******** *************** ***********@mic rosoft.com...
>> >> Book I am reading says that Cstr() is best method for efficency and
>> >> safety
>> >> however it doesnt compare that method of the .ToString() method.
>> >>
>> >> Which is best.
>> >>
>> >> Thanks
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Feb 19 '06 #11
CMM
Nonsense. CStr is not some VB6 (better term is VB.Classic) legacy thing....
in .NET it's just a convenience wrapper around CType... which when used to
cast to a string is simply a wrapper around the object's ToString("G"). I
personally tend to use ToString() as well on my own strings.... but when I'm
handling strings that come from functions that I know might return nulls I'd
tend to use CStr().... it's the same exact thing as typing out all your "If
bla Is Nothing" code that I'm sure litters your nasty code (or maybe it
doesn't.... which is just as bad).

P.S. I'm not sure you know what a Method vs. a Function vs. a Statement
is... at least judging from the poppycock vomited in your post.

--
-C. Moya
www.cmoya.com
"Scott M." <s-***@nospam.nosp am> wrote in message
news:eB******** ******@TK2MSFTN GP15.phx.gbl...

"guy" <gu*@discussion s.microsoft.com > wrote in message
news:21******** *************** ***********@mic rosoft.com...
both points of view are valid, however i use the vb string methods as the
compiler makes optimzations that can improve performance over the native
.Net
methods, also i find the vb methods read better.


The VB 6.0 way are not methods, they are functions. The .NET way are
object methods. The VB.NET compiler does NOT optimize the VB 6.0
functions to work BETTER than the natvie .NET object methods.

To answer your question, ToString would be my suggestion, rather than
CStr(). ToString is a method of the Object Type, and since all classes
inherit from Object, all objects have this method.


cheers

guy

"Scott M." wrote:
IMHO (and this has been debated for quite some time now), you should
view
all of the old "data-type" specific functions as legacy functions and no
longer use them. Instead, use the more object-oriented methods of a
type.

CStr, CBool, CDbl, CInt, etc. would all be replaced with CType or
.ToString
All date/time functions would be replaced with methods and properties of
the
Date class
All string functions would be replaced with methods and properties of
the
String class.

et all.
"Sean" <Se**@discussio ns.microsoft.co m> wrote in message
news:68******** *************** ***********@mic rosoft.com...
> Book I am reading says that Cstr() is best method for efficency and
> safety
> however it doesnt compare that method of the .ToString() method.
>
> Which is best.
>
> Thanks
>
>


Feb 19 '06 #12
>> Have you ever contibuted anything positive
Uh, yeah.

I suggested that checking your data before performing operations the data is
a best practice. I highly doubt that any competent programmer would
disagree. Apparently you are not in that group.

Or, is your specialty in buffer overruns?

At least you have a sound rationale -
"Checking if a variable actually contains data before doing a convert to
upper case is simply too much code."

Waaaaa! But Mom, those extra 20 keystrokes to check the data are soooo hard
to do. And besides, my code is better readable since you know I don't indent
If blocks.

Perhaps you should stick to scripting languages where you don't have all the
icky typed variable stuff going on. I mean, isn't it a hassle declaring all
those variable thingys, with all that code and stuff?

Maybe, after you've completed Junior High, you'll have a different
perspective.
(or to anything else) Yes, I don't write malware.

Bob Lehmann

"Martin" <x@y.com> wrote in message
news:eF******** *****@TK2MSFTNG P09.phx.gbl...
Just wondering... Have you ever contibuted anything positive to this
newsgroup? (or to anything else)
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:e6******** ******@tk2msftn gp13.phx.gbl... Checking if a variable actually contains data before doing a convert ...
is simply too much code.
You aren't serious, are you?
If you can avoid that it makes the code a lot better readable.

You mean like the sentence above? I'm sure you meant "a lot more better
readablest".

Happy coding, pal.

Bob Lehmann

"Martin" <x@y.com> wrote in message
news:uu******** ******@TK2MSFTN GP11.phx.gbl...
Wow, what happened to put you in this mood?
Checking if a variable actually contains data before doing a convert to
upper case is simply too much code. If you can avoid that it makes the

code
a lot better readable.
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:ep******** ******@TK2MSFTN GP12.phx.gbl...
>>> You can't use the OO methods on a string that is "Nothing"
>
> Why would you want to?
>
> Oh, I get it, you're too lazy to check the data before performing an
> operation it. Isn't checking your data a 100 level concept?
>
> I'm guessing that On Error Resume Next is one of your friends too.
>
> Bob Lehmann
>
> "CMM" <cm*@nospam.com > wrote in message
> news:%2******** **********@TK2M SFTNGP09.phx.gb l...
>> I don't think that's true at all. First off, CStr,CBool, Etc. are
all >> just
>> easier-to-read specialized wrappers around CType..... which in and of > itself
>> is a special "VB" construct. The true "non-VB" casting operator is
>> DirectCast(...) .
>>
>> Contrary to what Scott M says you're SUPPOSED to use them. What's the > point
>> of using VB if you're not going to use its special methods that make

your
>> life easier? This is straight from the VB documentation:
>>
>> "As a rule, you should use the Visual Basic type conversion functions in
>> preference to the .NET Framework methods such as ToString(), either

on >> the
>> Convert class or on an individual type structure or class. The Visual > Basic
>> functions are designed for optimal interaction with Visual Basic code, >> and
>> they also make your source code shorter and easier to read. In

addition,
> the
>> .NET Framework conversion methods do not always produce the same

results
> as
>> the Visual Basic functions, for example when converting Boolean to
> Integer.
>> For more information, see Troubleshooting Data Types."
>>
>> In addition, although I'm a guy who always initializes strings and
>> objects
>> as soon as possible rather than have them sit around until my
>> algorithm
> uses
>> them- so I don't really care about the following- but, there's an
> advantage
>> to using VB's functions: they interpret "Nothing." You can't use the
>> OO
>> methods on a string that is "Nothing" (s.ToUpper for instance won't
>> work).
>>
>> --
>> -C. Moya
>> www.cmoya.com
>> "Scott M." <s-***@nospam.nosp am> wrote in message
>> news:O7******** ******@TK2MSFTN GP14.phx.gbl...
>> > IMHO (and this has been debated for quite some time now), you should > view
>> > all of the old "data-type" specific functions as legacy functions
>> > and
>> > no
>> > longer use them. Instead, use the more object-oriented methods of a > type.
>> >
>> > CStr, CBool, CDbl, CInt, etc. would all be replaced with CType or
>> > .ToString
>> > All date/time functions would be replaced with methods and
>> > properties
>> > of
>> > the Date class
>> > All string functions would be replaced with methods and properties
>> > of
> the
>> > String class.
>> >
>> > et all.
>> >
>> >
>> > "Sean" <Se**@discussio ns.microsoft.co m> wrote in message
>> > news:68******** *************** ***********@mic rosoft.com...
>> >> Book I am reading says that Cstr() is best method for efficency and >> >> safety
>> >> however it doesnt compare that method of the .ToString() method.
>> >>
>> >> Which is best.
>> >>
>> >> Thanks
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Feb 19 '06 #13
Finishing junior high may be your problem. I have a real education ;-)

"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:ub******** ******@TK2MSFTN GP09.phx.gbl...
Have you ever contibuted anything positive Uh, yeah.

I suggested that checking your data before performing operations the data
is
a best practice. I highly doubt that any competent programmer would
disagree. Apparently you are not in that group.

Or, is your specialty in buffer overruns?

At least you have a sound rationale -
"Checking if a variable actually contains data before doing a convert to
upper case is simply too much code."

Waaaaa! But Mom, those extra 20 keystrokes to check the data are soooo
hard
to do. And besides, my code is better readable since you know I don't
indent
If blocks.

Perhaps you should stick to scripting languages where you don't have all
the
icky typed variable stuff going on. I mean, isn't it a hassle declaring
all
those variable thingys, with all that code and stuff?

Maybe, after you've completed Junior High, you'll have a different
perspective.
(or to anything else) Yes, I don't write malware.

Bob Lehmann

"Martin" <x@y.com> wrote in message
news:eF******** *****@TK2MSFTNG P09.phx.gbl...
Just wondering... Have you ever contibuted anything positive to this
newsgroup? (or to anything else)
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:e6******** ******@tk2msftn gp13.phx.gbl...
>>> Checking if a variable actually contains data before doing a convert

.. > is simply too much code.
> You aren't serious, are you?
>
>>> If you can avoid that it makes the code a lot better readable.
> You mean like the sentence above? I'm sure you meant "a lot more better
> readablest".
>
> Happy coding, pal.
>
> Bob Lehmann
>
> "Martin" <x@y.com> wrote in message
> news:uu******** ******@TK2MSFTN GP11.phx.gbl...
>> Wow, what happened to put you in this mood?
>> Checking if a variable actually contains data before doing a convert
>> to
>> upper case is simply too much code. If you can avoid that it makes the
> code
>> a lot better readable.
>>
>>
>> "Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
>> news:ep******** ******@TK2MSFTN GP12.phx.gbl...
>> >>> You can't use the OO methods on a string that is "Nothing"
>> >
>> > Why would you want to?
>> >
>> > Oh, I get it, you're too lazy to check the data before performing an
>> > operation it. Isn't checking your data a 100 level concept?
>> >
>> > I'm guessing that On Error Resume Next is one of your friends too.
>> >
>> > Bob Lehmann
>> >
>> > "CMM" <cm*@nospam.com > wrote in message
>> > news:%2******** **********@TK2M SFTNGP09.phx.gb l...
>> >> I don't think that's true at all. First off, CStr,CBool, Etc. are all >> >> just
>> >> easier-to-read specialized wrappers around CType..... which in and of >> > itself
>> >> is a special "VB" construct. The true "non-VB" casting operator is
>> >> DirectCast(...) .
>> >>
>> >> Contrary to what Scott M says you're SUPPOSED to use them. What's the >> > point
>> >> of using VB if you're not going to use its special methods that
>> >> make
> your
>> >> life easier? This is straight from the VB documentation:
>> >>
>> >> "As a rule, you should use the Visual Basic type conversion functions > in
>> >> preference to the .NET Framework methods such as ToString(), either on >> >> the
>> >> Convert class or on an individual type structure or class. The Visual >> > Basic
>> >> functions are designed for optimal interaction with Visual Basic code, >> >> and
>> >> they also make your source code shorter and easier to read. In
> addition,
>> > the
>> >> .NET Framework conversion methods do not always produce the same
> results
>> > as
>> >> the Visual Basic functions, for example when converting Boolean to
>> > Integer.
>> >> For more information, see Troubleshooting Data Types."
>> >>
>> >> In addition, although I'm a guy who always initializes strings and
>> >> objects
>> >> as soon as possible rather than have them sit around until my
>> >> algorithm
>> > uses
>> >> them- so I don't really care about the following- but, there's an
>> > advantage
>> >> to using VB's functions: they interpret "Nothing." You can't use
>> >> the
>> >> OO
>> >> methods on a string that is "Nothing" (s.ToUpper for instance won't
>> >> work).
>> >>
>> >> --
>> >> -C. Moya
>> >> www.cmoya.com
>> >> "Scott M." <s-***@nospam.nosp am> wrote in message
>> >> news:O7******** ******@TK2MSFTN GP14.phx.gbl...
>> >> > IMHO (and this has been debated for quite some time now), you should >> > view
>> >> > all of the old "data-type" specific functions as legacy functions
>> >> > and
>> >> > no
>> >> > longer use them. Instead, use the more object-oriented methods
>> >> > of a >> > type.
>> >> >
>> >> > CStr, CBool, CDbl, CInt, etc. would all be replaced with CType or
>> >> > .ToString
>> >> > All date/time functions would be replaced with methods and
>> >> > properties
>> >> > of
>> >> > the Date class
>> >> > All string functions would be replaced with methods and
>> >> > properties
>> >> > of
>> > the
>> >> > String class.
>> >> >
>> >> > et all.
>> >> >
>> >> >
>> >> > "Sean" <Se**@discussio ns.microsoft.co m> wrote in message
>> >> > news:68******** *************** ***********@mic rosoft.com...
>> >> >> Book I am reading says that Cstr() is best method for efficency and >> >> >> safety
>> >> >> however it doesnt compare that method of the .ToString() method.
>> >> >>
>> >> >> Which is best.
>> >> >>
>> >> >> Thanks
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Feb 19 '06 #14
I think you better read your own post. CStr() is a built-in function of the
VB 6 language. It is not a method. ToString is a method of the Object type
(which all classes in .NET derive from). So, I'm not sure why you feel the
need to call this poppycock and suggest that I don't know what a function
vs. a method is.

As for which is better... As I said in my first post, it is a matter of
choice and I prefer the more object-oriented ToString object method.
"CMM" <cm*@nospam.com > wrote in message
news:ed******** ******@TK2MSFTN GP11.phx.gbl...
Nonsense. CStr is not some VB6 (better term is VB.Classic) legacy
thing.... in .NET it's just a convenience wrapper around CType... which
when used to cast to a string is simply a wrapper around the object's
ToString("G"). I personally tend to use ToString() as well on my own
strings.... but when I'm handling strings that come from functions that I
know might return nulls I'd tend to use CStr().... it's the same exact
thing as typing out all your "If bla Is Nothing" code that I'm sure
litters your nasty code (or maybe it doesn't.... which is just as bad).

P.S. I'm not sure you know what a Method vs. a Function vs. a Statement
is... at least judging from the poppycock vomited in your post.

--
-C. Moya
www.cmoya.com
"Scott M." <s-***@nospam.nosp am> wrote in message
news:eB******** ******@TK2MSFTN GP15.phx.gbl...

"guy" <gu*@discussion s.microsoft.com > wrote in message
news:21******** *************** ***********@mic rosoft.com...
both points of view are valid, however i use the vb string methods as
the
compiler makes optimzations that can improve performance over the native
.Net
methods, also i find the vb methods read better.


The VB 6.0 way are not methods, they are functions. The .NET way are
object methods. The VB.NET compiler does NOT optimize the VB 6.0
functions to work BETTER than the natvie .NET object methods.

To answer your question, ToString would be my suggestion, rather than
CStr(). ToString is a method of the Object Type, and since all classes
inherit from Object, all objects have this method.


cheers

guy

"Scott M." wrote:

IMHO (and this has been debated for quite some time now), you should
view
all of the old "data-type" specific functions as legacy functions and
no
longer use them. Instead, use the more object-oriented methods of a
type.

CStr, CBool, CDbl, CInt, etc. would all be replaced with CType or
.ToString
All date/time functions would be replaced with methods and properties
of the
Date class
All string functions would be replaced with methods and properties of
the
String class.

et all.
"Sean" <Se**@discussio ns.microsoft.co m> wrote in message
news:68******** *************** ***********@mic rosoft.com...
> Book I am reading says that Cstr() is best method for efficency and
> safety
> however it doesnt compare that method of the .ToString() method.
>
> Which is best.
>
> Thanks
>
>



Feb 19 '06 #15
> Contrary to what Scott M says you're SUPPOSED to use them. What's the
point of using VB if you're not going to use its special methods that make
your life easier?


You should really relax and read what was posted. If you were supposed to
use the legacy conversion functions and not the .NET ToString and CType,
then why would MS add them in the first place.

My post started with IMHO and that much has been debated about this before.

Your opinion is fine, but it is just that. Wrappers have their own
downside, which tend to be more CPU cycles.
Feb 19 '06 #16

well .........

option 1

dim x as string
----- some stuff here that might or might not fill the string
if not x is nothing then
if x.length>0 then
---- do your stuff
end if
end if

option 2

dim x as string = ""
----- some stuff here that might or might not fill the string
if x.length>0 then
---- do your stuff
end if

option 3

dim x as string
----- some stuff here that might or might not fill the string
if len(x)>0 then
---- do your stuff
end if
Well In My Homble Opinion it all depends on a few factors what should favor
you

1. your personal coding style
2. design of your app ( if constructs like this happen a lot you might save
some typing with option 2 or 3 )
3. portability need to other .Net languages

I believe that option 1 and 3 are the same , although it is written
different option 2 is the practical guideline for VB and C# and is probably
the fastest and time sparing ( prevents RSI the most :-) )

regards

Michel Posseth [MCP]



"Scott M." <s-***@nospam.nosp am> schreef in bericht
news:um******** ******@TK2MSFTN GP14.phx.gbl...
Contrary to what Scott M says you're SUPPOSED to use them. What's the
point of using VB if you're not going to use its special methods that
make your life easier?


You should really relax and read what was posted. If you were supposed to
use the legacy conversion functions and not the .NET ToString and CType,
then why would MS add them in the first place.

My post started with IMHO and that much has been debated about this
before.

Your opinion is fine, but it is just that. Wrappers have their own
downside, which tend to be more CPU cycles.

Feb 19 '06 #17
"CMM" <cm*@nospam.com > schrieb:
I don't think that's true at all. First off, CStr,CBool, Etc. are all just
easier-to-read specialized wrappers around CType..... which in and of
itself is a special "VB" construct.
ACK. While it doesn't matter if you use 'C<Type>' or 'CType(..., <Type>)',
I strongly recommend to use them instead of 'Convert.To*'.
The true "non-VB" casting operator is DirectCast(...) .


.... which doesn't mean that 'DirectCast' should not be used. Personally I
prefer 'CType' for value types (type conversions) and 'DirectCast' for type
casts (reference types). However, some other people prefer to use 'CType'
instead of 'DirectCast'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 19 '06 #18
"Bob Lehmann" <no****@dontbot herme.zzz> schrieb:
You can't use the OO methods on a string that is "Nothing"


Why would you want to?

Oh, I get it, you're too lazy to check the data before performing an
operation it. Isn't checking your data a 100 level concept?


Why type 'If s IsNot Nothing AndAlso s.Length > 0 Then' if you could shorten
it to 'If Len(s) > 0 Then'? The same applies to 'ToString' vs. 'CStr': Why
type

\\\
If o Is Nothing Then
s = ""
Else
s = o.ToString()
End If
///

if you could archieve the same by using

\\\
s = CStr(o)
///

?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 19 '06 #19
"Bob Lehmann" <no****@dontbot herme.zzz> schrieb:
At least you have a sound rationale -
"Checking if a variable actually contains data before doing a convert to
upper case is simply too much code."

Waaaaa! But Mom, those extra 20 keystrokes to check the data are soooo
hard
to do. And besides, my code is better readable since you know I don't
indent
If blocks.


Well, why duplicate this checking code all over the source code if it is
possible to encapsulate it cleanly in high-level wrappers/functions like
'CStr'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 19 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
7710
by: Bill L. | last post by:
We recently noticed that the vb.net CStr function yields different results than the vb6 version when converting SQL decimal data. If, for example, the data is defined in SQL as decimal(19,10), the vb.net CStr function will return ten digits to the right of the decimal, regardless of the data value. In this case, if the data value is 5, the vb.net CStr function will return 5.0000000000. The vb6 CStr function will simply return 5. In other...
5
10476
by: c_shah | last post by:
Very beginner question.. What's difference between cstr vs .ToString vs Ctype for converting to String?
7
2770
by: John | last post by:
Hi I have a WinForm app with a bound form. When user enters a value in field rateid I lookup the respective rate amount from a table and assign it to field rate.I am using the DLookup function to achieve this (full code given below). This function returns a value of type object so I need to convert it to string. If I use the function as below (using ToString) it works fine; Me.txtRate.Text = DLookup(<parameters here>).ToString
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10626
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.