473,785 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inheritance and Shared Methods

1. I have a Base class that has a certain amount of functionality.
2. Then I have a CodeSmith generated class that inherits from the Base class
and adds functionality.
3. Since I want to be able to re-generate the classes on level 2 I have a
3rd level that inherits from them and implements specific hand coded
methods.
4. My colleague asked me to create a 4th level class that inherits the 3rd
level class so he can write custom functionality that overrides the "plain"
functionality at all levels above it.

I have 1-3 implemented as Shared methods.
To me, this enables simpler UI code.

For example:
strSQL = Level3ClassName .Select

In this way I do not need to instantiate an instance of the class I just use
the shared methods in levels 1-3.

=============== =============== =============== ==============
My problem (other than being new and not really understanding this well
enough yet <g> )
is I don't know how to implement Level 4 in a way that allows me to use
Shared methods in levels1-3 and yet Override them in Level 4.

Is it not possible?
=============== =============== =============== =============== ==

If I have to change Levels 1-3 what would you recommend?

=============== =============== =============== ===

Sample code:

Level 1
Public MustInherit Class Base

Public Shared Function DoSomething(ByV al Source As String) As String

End Function
=============== =============== =============== ===
Level 2
Public MustInherit Class GeneratedStuff

Inherits Base

Public Shared Function DoSomethingElse (ByVal Source As String) As String

End Function
=============== =============== =============== ===
Level 3
Public MustInherit Class HandCodedStuff

Inherits GeneratedStuff

Public Shared Function IWroteThis(ByVa l Source As String) As String

End Function
=============== =============== =============== ===
Level 4 (implements same functionality as Level 3 but also allows customized
changes by overriding methods or creating new ones that are specific to a
single client. Level 3 functionality is for all clients.)
Public MustInherit Class FinalLevel

Inherits HandCodedStuff

Overrides Function DoSomethingElse (ByVal Source As String) As String

End Function

Thanks for any advice!
--
Joe Fallon


Nov 20 '05 #1
33 3494
I would think that in the 4th class if you wanted to use the shared methods
from classes 1-3, you would say "myBase.met hod" and in the 4th class you
could define an Overrides method that overrides the shared method in the
base class.
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
1. I have a Base class that has a certain amount of functionality.
2. Then I have a CodeSmith generated class that inherits from the Base class and adds functionality.
3. Since I want to be able to re-generate the classes on level 2 I have a
3rd level that inherits from them and implements specific hand coded
methods.
4. My colleague asked me to create a 4th level class that inherits the 3rd
level class so he can write custom functionality that overrides the "plain" functionality at all levels above it.

I have 1-3 implemented as Shared methods.
To me, this enables simpler UI code.

For example:
strSQL = Level3ClassName .Select

In this way I do not need to instantiate an instance of the class I just use the shared methods in levels 1-3.

=============== =============== =============== ==============
My problem (other than being new and not really understanding this well
enough yet <g> )
is I don't know how to implement Level 4 in a way that allows me to use
Shared methods in levels1-3 and yet Override them in Level 4.

Is it not possible?
=============== =============== =============== =============== ==

If I have to change Levels 1-3 what would you recommend?

=============== =============== =============== ===

Sample code:

Level 1
Public MustInherit Class Base

Public Shared Function DoSomething(ByV al Source As String) As String

End Function
=============== =============== =============== ===
Level 2
Public MustInherit Class GeneratedStuff

Inherits Base

Public Shared Function DoSomethingElse (ByVal Source As String) As String

End Function
=============== =============== =============== ===
Level 3
Public MustInherit Class HandCodedStuff

Inherits GeneratedStuff

Public Shared Function IWroteThis(ByVa l Source As String) As String

End Function
=============== =============== =============== ===
Level 4 (implements same functionality as Level 3 but also allows customized changes by overriding methods or creating new ones that are specific to a
single client. Level 3 functionality is for all clients.)
Public MustInherit Class FinalLevel

Inherits HandCodedStuff

Overrides Function DoSomethingElse (ByVal Source As String) As String

End Function

Thanks for any advice!
--
Joe Fallon

Nov 20 '05 #2
Hi Joe,

If you want to keep your methods as Shared then you can't use Overrides in
Level 4. Overrideable and Overrides are only available with object methods, so
that would be goodbye to your Shared..

There is, however, the option of using Shadows. In FinalLevel,
Shadows Function DoSomethingElse (...) As String
will make the name DoSomethingElse available to users of that class.

If you were doing this using object methods and Overrides, you would call
the base class method using MyBase.SameMeth od as Scott pointed out.

With Shared methods the equivalent is simply to use the name of the base
class.

So you could have:
'Level 2
Public MustInherit Class GeneratedStuff
Inherits Base
Public Shared Function DoSomethingElse (...) As String
End Function
End Class

'Level 4
Public MustInherit Class FinalLevel_Clie nt1
Inherits HandCodedStuff
Shadows Public Shared Function DoSomethingElse (...) As String
GeneratedStuff. DoSomethingElse (...) 'If necessary:
'Do Client1's something else.
End Function
End Class

'Ditto for Client2, etc.

Regards,
Fergus
Nov 20 '05 #3
* "Joe Fallon" <jf******@nospa mtwcny.rr.com> scripsit:
1. I have a Base class that has a certain amount of functionality.
2. Then I have a CodeSmith generated class that inherits from the Base class
and adds functionality.
3. Since I want to be able to re-generate the classes on level 2 I have a
3rd level that inherits from them and implements specific hand coded
methods.
4. My colleague asked me to create a 4th level class that inherits the 3rd
level class so he can write custom functionality that overrides the "plain"
functionality at all levels above it.

I have 1-3 implemented as Shared methods.
To me, this enables simpler UI code.


You cannot override a shared method. I would suggest to remove the
'Shared' from the declaration and implement something like the Singleton
design pattern. You can make a Google search if you want to get more
information on the Singleton pattern.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Scott,
Overrides & Shared are incompatible. You can only override Overridable
methods. Overridable methods cannot be Shared.

Hope this helps
Jay

"Scott M." <s-***@badspamsnet .net> wrote in message
news:uv******** *****@TK2MSFTNG P11.phx.gbl...
I would think that in the 4th class if you wanted to use the shared methods from classes 1-3, you would say "myBase.met hod" and in the 4th class you
could define an Overrides method that overrides the shared method in the
base class.
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
1. I have a Base class that has a certain amount of functionality.
2. Then I have a CodeSmith generated class that inherits from the Base

class
and adds functionality.
3. Since I want to be able to re-generate the classes on level 2 I have a 3rd level that inherits from them and implements specific hand coded
methods.
4. My colleague asked me to create a 4th level class that inherits the 3rd level class so he can write custom functionality that overrides the

"plain"
functionality at all levels above it.

I have 1-3 implemented as Shared methods.
To me, this enables simpler UI code.

For example:
strSQL = Level3ClassName .Select

In this way I do not need to instantiate an instance of the class I just

use
the shared methods in levels 1-3.

=============== =============== =============== ==============
My problem (other than being new and not really understanding this well
enough yet <g> )
is I don't know how to implement Level 4 in a way that allows me to use
Shared methods in levels1-3 and yet Override them in Level 4.

Is it not possible?
=============== =============== =============== =============== ==

If I have to change Levels 1-3 what would you recommend?

=============== =============== =============== ===

Sample code:

Level 1
Public MustInherit Class Base

Public Shared Function DoSomething(ByV al Source As String) As String

End Function
=============== =============== =============== ===
Level 2
Public MustInherit Class GeneratedStuff

Inherits Base

Public Shared Function DoSomethingElse (ByVal Source As String) As String

End Function
=============== =============== =============== ===
Level 3
Public MustInherit Class HandCodedStuff

Inherits GeneratedStuff

Public Shared Function IWroteThis(ByVa l Source As String) As String

End Function
=============== =============== =============== ===
Level 4 (implements same functionality as Level 3 but also allows

customized
changes by overriding methods or creating new ones that are specific to a single client. Level 3 functionality is for all clients.)
Public MustInherit Class FinalLevel

Inherits HandCodedStuff

Overrides Function DoSomethingElse (ByVal Source As String) As String

End Function

Thanks for any advice!
--
Joe Fallon


Nov 20 '05 #5
What about Shadows then?
"Jay B. Harlow [MVP - Outlook]" <Ja********@ema il.msn.com> wrote in message
news:ut******** ******@TK2MSFTN GP09.phx.gbl...
Scott,
Overrides & Shared are incompatible. You can only override Overridable
methods. Overridable methods cannot be Shared.

Hope this helps
Jay

"Scott M." <s-***@badspamsnet .net> wrote in message
news:uv******** *****@TK2MSFTNG P11.phx.gbl...
I would think that in the 4th class if you wanted to use the shared methods
from classes 1-3, you would say "myBase.met hod" and in the 4th class you
could define an Overrides method that overrides the shared method in the
base class.
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
1. I have a Base class that has a certain amount of functionality.
2. Then I have a CodeSmith generated class that inherits from the Base

class
and adds functionality.
3. Since I want to be able to re-generate the classes on level 2 I have a
3rd level that inherits from them and implements specific hand coded
methods.
4. My colleague asked me to create a 4th level class that inherits the 3rd level class so he can write custom functionality that overrides the "plain"
functionality at all levels above it.

I have 1-3 implemented as Shared methods.
To me, this enables simpler UI code.

For example:
strSQL = Level3ClassName .Select

In this way I do not need to instantiate an instance of the class I
just
use
the shared methods in levels 1-3.

=============== =============== =============== ==============
My problem (other than being new and not really understanding this

well enough yet <g> )
is I don't know how to implement Level 4 in a way that allows me to use Shared methods in levels1-3 and yet Override them in Level 4.

Is it not possible?
=============== =============== =============== =============== ==

If I have to change Levels 1-3 what would you recommend?

=============== =============== =============== ===

Sample code:

Level 1
Public MustInherit Class Base

Public Shared Function DoSomething(ByV al Source As String) As String

End Function
=============== =============== =============== ===
Level 2
Public MustInherit Class GeneratedStuff

Inherits Base

Public Shared Function DoSomethingElse (ByVal Source As String) As String
End Function
=============== =============== =============== ===
Level 3
Public MustInherit Class HandCodedStuff

Inherits GeneratedStuff

Public Shared Function IWroteThis(ByVa l Source As String) As String

End Function
=============== =============== =============== ===
Level 4 (implements same functionality as Level 3 but also allows

customized
changes by overriding methods or creating new ones that are specific

to a single client. Level 3 functionality is for all clients.)
Public MustInherit Class FinalLevel

Inherits HandCodedStuff

Overrides Function DoSomethingElse (ByVal Source As String) As String

End Function

Thanks for any advice!
--
Joe Fallon



Nov 20 '05 #6
Joe,
I would recommend a Singleton pattern as Herfried suggested. The "problem"
your going to have is where to put the singleton. Ideally you would make
Base the Singleton, however that makes it difficult for the derived classes
to override implementation. You could make the derived classes the
singleton, however then your program is 'hard coded' to the derived class.

The approach I would consider is to make Base the Singleton, however I would
store the class name to use in the app.config file. When the base creates
the instance of the singleton, it would get the class out of the app.config.
Effectively combining the Singleton Pattern with a PlugIn pattern.

http://www.yoda.arachsys.com/csharp/singleton.html
http://www.martinfowler.com/eaaCatalog/plugin.html

Something like:

Imports System.Configur ation

Public MustInherit Class Base

#Region " Singleton support "

Private Shared m_instance As Base

Public Shared Readonly Property Instance() As Base
Get
If m_instance is Nothing Then
Dim s As String =
ConfigurationSe ttings.AppSetti ngs("base.type" )
Dim t As Type = Type.GetType(s)
m_instance =
DirectCast(Acti vator.CreateIns tance(t,True), Base)
End If
Return m_Instance
End Get
End Property

Protected Sub New()
End Sub

#End Region

Public Function DoSomething(ByV al Source As String) As String
End Function

Public MustOverride Function DoSomethingElse (ByVal Source As String)
As String

Public MustOverride Function IWroteThis(ByVa l Source As String) As
String

End Class

Public MustInherit Class GeneratedStuff
Inherits Base
Protected Sub New()
End Sub

Public Overrides Function DoSomethingElse (ByVal Source As String) As
String
End Function

End Class

Public Class HandCodedStuff
Inherits GeneratedStuff
Protected Sub New()
End Sub

Public Overrides Function IWroteThis(ByVa l Source As String) As
String
End Function

End Class

Public Class FinalLevel
Inherits HandCodedStuff
Protected Sub New()
End Sub

Public Overrides Function DoSomethingElse (ByVal Source As String) As
String
End Function

End Class

' The app.config file
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<appSettings>
<add key="base.type" value="myprojec t.FinalLevel, myproject" />
</appSettings>
</configuration>

Then when you need to use the instance you simply use:

Dim source As String
Base.Instance.D oSomething(sour ce)
Base.Instance.I WroteThis(sourc e)
Base.Instance.D oSomethingElse( source)

Note the type in the config file should be in the format
"mynamespace.my class, myassembly", where myclass is the class name you are
using, mynamespace is the namespace that class belongs to, and myassembly is
the assembly where the class is. Normally you can get the namespace &
assembly from the Project Properties. In the above case myclass can be
either FinalLevel or HandCodedStuff.

Note: The True in "Activator.Crea teInstance(t,Tr ue)", allows non public
constructors to be used, this allows you to add the protected constructors
preventing the class from being created outside of the singleton pattern.

If the above is included in a class library assembly, I would define a
custom section for app.config file. Each app that used the class library
would then need to include the custom section in their app.config. This
allows better isolation for the class library settings verses the
application settings.

Public Shared ReadOnly Property Instance() As Base
Get
If m_instance Is Nothing Then
Dim col As IDictionary =
DirectCast(Conf igurationSettin gs.GetConfig("m yprojectSetting s"),
IDictionary)
Dim s As String = DirectCast(col( "type"), String)
Dim t As Type = Type.GetType(s)
m_instance = DirectCast(Acti vator.CreateIns tance(t, True),
Base)
End If
Return m_instance
End Get
End Property

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<configSections >
<section name="myproject Settings"
type="System.Co nfiguration.Sin gleTagSectionHa ndler" />
</configSections>
<appSettings>
</appSettings>
<myprojectSetti ngs type="FunWithBu ttons.FinalLeve l,
Fun.With.Button s" />
</configuration>

The thing I like about the custom configuration section is you can give more
meaningful names, such as the assembly name & "type" for the value.

Hope this helps
Jay

"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
1. I have a Base class that has a certain amount of functionality.
2. Then I have a CodeSmith generated class that inherits from the Base class and adds functionality.
3. Since I want to be able to re-generate the classes on level 2 I have a
3rd level that inherits from them and implements specific hand coded
methods.
4. My colleague asked me to create a 4th level class that inherits the 3rd
level class so he can write custom functionality that overrides the "plain" functionality at all levels above it.

I have 1-3 implemented as Shared methods.
To me, this enables simpler UI code.

For example:
strSQL = Level3ClassName .Select

In this way I do not need to instantiate an instance of the class I just use the shared methods in levels 1-3.

=============== =============== =============== ==============
My problem (other than being new and not really understanding this well
enough yet <g> )
is I don't know how to implement Level 4 in a way that allows me to use
Shared methods in levels1-3 and yet Override them in Level 4.

Is it not possible?
=============== =============== =============== =============== ==

If I have to change Levels 1-3 what would you recommend?

=============== =============== =============== ===

Sample code:

Level 1
Public MustInherit Class Base

Public Shared Function DoSomething(ByV al Source As String) As String

End Function
=============== =============== =============== ===
Level 2
Public MustInherit Class GeneratedStuff

Inherits Base

Public Shared Function DoSomethingElse (ByVal Source As String) As String

End Function
=============== =============== =============== ===
Level 3
Public MustInherit Class HandCodedStuff

Inherits GeneratedStuff

Public Shared Function IWroteThis(ByVa l Source As String) As String

End Function
=============== =============== =============== ===
Level 4 (implements same functionality as Level 3 but also allows customized changes by overriding methods or creating new ones that are specific to a
single client. Level 3 functionality is for all clients.)
Public MustInherit Class FinalLevel

Inherits HandCodedStuff

Overrides Function DoSomethingElse (ByVal Source As String) As String

End Function

Thanks for any advice!
--
Joe Fallon

Nov 20 '05 #7
Hi Scott,

If you are ignoring my posts, you won't have seen that I recommended using
Shadows in this case.

Regards,
Fergus
Nov 20 '05 #8
Scott,
As Fergus stated, he wrote up a little something on Shadows.

The problem is that Shadows does not Override functionality. Shadows Hides
functionality.

If you used Shadows and referred to the base class you will get the base
class functionality. The way I read Joe's comments, he wants to override the
base class functionality, in that he could refer to the base class and see
the replaced functionality.

Don't get me wrong you can use Shadows in a situation like this, and in some
ways its the "easiest" thing to use in Joe's case. However just be certain
you know what Shadows is giving you & not giving you.

For a sample of how to use Overrides in Joe's case, see my other long post
to this thread.

Hope this helps
Jay

"Scott M." <s-***@badspamsnet .net> wrote in message
news:Oo******** ******@TK2MSFTN GP09.phx.gbl...
What about Shadows then?
"Jay B. Harlow [MVP - Outlook]" <Ja********@ema il.msn.com> wrote in message news:ut******** ******@TK2MSFTN GP09.phx.gbl...
Scott,
Overrides & Shared are incompatible. You can only override Overridable
methods. Overridable methods cannot be Shared.

Hope this helps
Jay

"Scott M." <s-***@badspamsnet .net> wrote in message
news:uv******** *****@TK2MSFTNG P11.phx.gbl...
I would think that in the 4th class if you wanted to use the shared

methods
from classes 1-3, you would say "myBase.met hod" and in the 4th class you could define an Overrides method that overrides the shared method in the base class.
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
> 1. I have a Base class that has a certain amount of functionality.
> 2. Then I have a CodeSmith generated class that inherits from the Base class
> and adds functionality.
> 3. Since I want to be able to re-generate the classes on level 2 I have
a
> 3rd level that inherits from them and implements specific hand coded
> methods.
> 4. My colleague asked me to create a 4th level class that inherits
the 3rd
> level class so he can write custom functionality that overrides the
"plain"
> functionality at all levels above it.
>
> I have 1-3 implemented as Shared methods.
> To me, this enables simpler UI code.
>
> For example:
> strSQL = Level3ClassName .Select
>
> In this way I do not need to instantiate an instance of the class I

just use
> the shared methods in levels 1-3.
>
> =============== =============== =============== ==============
> My problem (other than being new and not really understanding this well > enough yet <g> )
> is I don't know how to implement Level 4 in a way that allows me to use > Shared methods in levels1-3 and yet Override them in Level 4.
>
> Is it not possible?
> =============== =============== =============== =============== ==
>
> If I have to change Levels 1-3 what would you recommend?
>
> =============== =============== =============== ===
>
> Sample code:
>
> Level 1
> Public MustInherit Class Base
>
> Public Shared Function DoSomething(ByV al Source As String) As String
>
> End Function
>
>
> =============== =============== =============== ===
> Level 2
> Public MustInherit Class GeneratedStuff
>
> Inherits Base
>
> Public Shared Function DoSomethingElse (ByVal Source As String) As String >
> End Function
>
>
> =============== =============== =============== ===
> Level 3
> Public MustInherit Class HandCodedStuff
>
> Inherits GeneratedStuff
>
> Public Shared Function IWroteThis(ByVa l Source As String) As String
>
> End Function
>
>
> =============== =============== =============== ===
> Level 4 (implements same functionality as Level 3 but also allows
customized
> changes by overriding methods or creating new ones that are specific

to
a
> single client. Level 3 functionality is for all clients.)
> Public MustInherit Class FinalLevel
>
> Inherits HandCodedStuff
>
> Overrides Function DoSomethingElse (ByVal Source As String) As String
>
> End Function
>
>
>
> Thanks for any advice!
> --
> Joe Fallon
>
>
>
>



Nov 20 '05 #9
* "Fergus Cooney" <fi*****@post.c om> scripsit:
If you are ignoring my posts, you won't have seen that I recommended using
Shadows in this case.


Your post is an advice to use 'Shadows' which doesn't make sense.
Please be so kind to say thanks if someone tells you that you made a
mistake.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #10

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

Similar topics

20
10085
by: km | last post by:
Hi all, In the following code why am i not able to access class A's object attribute - 'a' ? I wishto extent class D with all the attributes of its base classes. how do i do that ? thanks in advance for enlightment ... here's the snippet #!/usr/bin/python
3
1703
by: marv | last post by:
If I have abstract base classes like these: //--------- class IBase { public: virtual void Action(void) = 0; };
14
12919
by: Steve Jorgensen | last post by:
Recently, I tried and did a poor job explaining an idea I've had for handling a particular case of implementation inheritance that would be easy and obvious in a fully OOP language, but is not at all obvious in VBA which lacks inheritance. I'm trying the explanation again now. I often find cases where a limited form of inheritance would eliminate duplication my code that seems impossible to eliminate otherwise. I'm getting very...
5
2050
by: Invalidlastname | last post by:
Hi, I just read the pattern "Design and Implementation Guidelines for Web Clients" from MSDN. Here is my question. In chapter 3, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/diforwc-ch03.asp , the article mentions using page inheritance to maintain common page layout. We currently use page inheritance approach to segment the function areas. In each function area, there is a base page to provide the common...
10
1249
by: John | last post by:
Hi, How can I achieve that a childs constructor is only callable from it's parent? Must I declare the class Private within A? Thanks in Advance Public MustInherit Class A Protected Sub New()
2
1204
by: rodchar | last post by:
hey all, i have a MustInherit class and a derived class. is it possible to have a shared method in the base class and use it? Note: this is not working for me but just going to explain. i have a base class that has a shared function that returns a connection string for a datasource. is there a way for the derived class to use that? when i try me.connStr it says i have to instantiate it.
5
1096
by: AWesner | last post by:
I've been working on a project to help myself better understand how inherited classes work. I think I've learned more about classes by doing this than any other effort I've made. I've tried to create a simple problem by creating a class named TestThis that inherits System.Windows.Forms.Form and then adding one shared procedure to this. I set the form to inherit TestThis instead and it gets everything plus the one procedure that I've...
6
1885
by: burningodzilla | last post by:
Hi all - I'm preparing to dive in to more complex application development using javascript, and among other things, I'm having a hard time wrapping my head around an issues regarding "inheritance" using the prototype property. I realize there are no classes in JS, that code therefore lives in objects instead of class definitions, and that "inheritance" must be achieved prototypically and not classically. That said, on with the code. Say I...
8
1312
by: tharringtonan | last post by:
I am compiling the following code, main.cpp, as follows: gcc main.cpp I get the following compile error: main.cpp: In function `int main()': main.cpp:28: no matching function for call to `CPolygon::area()' The code is listed below:
0
9480
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
10324
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...
1
10090
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,...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6739
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
5380
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
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
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.