1

Topic: What means virtual at function declaration in a class?

What means virtual at function declaration in a class? As I understand, by means of a word virtual polymorphism is provided - ability of the program during the execution to define, how to what class function with a certain name concerns. But it would be desirable to learn more in detail about this keyword. Than the construction class MyClass1 {//the data of class MyClass1 differs; MyClass1 ();//the designer ~MyClass1 ();// int MyFunc1 (int a, inb b);//other methods of class MyCLass1;}; class MyClass2: public MyClass1 {//the data of class MyCLass2; MyClass2 ();//the designer ~MyClass2 ();//; int MyFunc1 (int a, int b);//other methods of class MyClass2;}; from a construction class MyClass1 {//the data of class MyClass1; MyClass1 ();//the designer ~MyClass1 ();// virtual int MyFunc1 (int a, inb b);//other methods of class MyCLass1;} ; class MyClass2: public MyClass1 {//the data of class MyCLass2; MyClass2 ();//the designer ~MyClass2 ();//; virtual int MyFunc1 (int a, int b);//other methods of class MyClass2;};?

2

Re: What means virtual at function declaration in a class?

In the first case you cannot cause function MyClass2 under the pointer on MyClass1

3

Re: What means virtual at function declaration in a class?

Hello, RussianFellow, you wrote: RF> That means virtual at function declaration in a class? Lecture. The virtual functions and polymorphism

4

Re: What means virtual at function declaration in a class?

Hello, RussianFellow, you wrote: RF> That means virtual at function declaration in a class? RF> as I understand, by means of a word virtual polymorphism is provided - ability of the program during the execution to define, how to what class function with a certain name concerns. http://rsdn.org/forum/philosophy/2853873 the author: Gaperton Date: 26.02.08

5

Re: What means virtual at function declaration in a class?

Hello, RussianFellow, you wrote: RF> That means virtual at function declaration in a class? Means necessity of learning of language before to start code writing.

6

Re: What means virtual at function declaration in a class?

Hello, Pavel Dvorkin, you wrote: RF>> That means virtual at function declaration in a class? PD> means necessity of learning of language before to start code writing. I so understand, a companion, after long years in the politician and other similar forums, solved on a C ++ the list to tear

7

Re: What means virtual at function declaration in a class?

Hello, Pavel Dvorkin, you wrote: PD> Means necessity of learning of language before to start code writing. The first did not withstand Itself wanted similar to answer something ... but recalled itself in far 96-97 with Svanom in , and became kinder

8

Re: What means virtual at function declaration in a class?

Hello, Carc, you wrote: the C> Itself wanted similar to answer something ... but recalled itself in far 96-97 with Svanom in , and I became kinder I understand, but to all the limit is. Here here look. http://rsdn.org/forum/mfc/

9

Re: What means virtual at function declaration in a class?

Hello, Pavel Dvorkin, you wrote: PD> I understand, but to all the limit is. +100500 this companion that asked about virtual, cluttered up and  all on MFC and WINAPI. And now tries to achieve, that here to it arranged free courses of an educational program on programming

10

Re: What means virtual at function declaration in a class?

PD> I understand, but to all the limit is. PD> here here look. PD> http://rsdn.org/forum/mfc/ yes I saw

11

Re: What means virtual at function declaration in a class?

12

Re: What means virtual at function declaration in a class?

13

Re: What means virtual at function declaration in a class?

Hello, Marty, you wrote: M> I so understand, a companion, after long years in the politician and other similar forums, solved on a C ++ the list to tear What for for this purpose "virtual"?

14

Re: What means virtual at function declaration in a class?

Hello, Ops, you wrote: M>> I so understand, a companion, after long years in the politician and other similar forums, solved on a C ++ the list to tear Ops> What for for this purpose "virtual"? Perhaps it does the hierarchy of containers, with root class CContainer and the virtual method reverse

15

Re: What means virtual at function declaration in a class?

Hello, Pavel Dvorkin, you wrote: PD> I understand, but to all the limit is. PD> here here look. PD> http://rsdn.org/forum/mfc/ a hell and Israel any

16

Re: What means virtual at function declaration in a class?

Here I on a subject title thought that there will be an artful question with a dirty trick, probably uncovering next bug of Studio. And it appeared - a question under the abc-book

17

Re: What means virtual at function declaration in a class?

Hello, T4r4sB, you wrote: TB> Here I on a subject title thought that there will be an artful question with a dirty trick, probably uncovering next bug of Studio. TB> and it appeared - a question under the abc-book And I on the author of a subject thought Slightly, truth, too was surprised  a question, but shock did not test

18

Re: What means virtual at function declaration in a class?

Hello, AlexGin, you wrote: AG> the Fat minus - the section revived for the account of children's questions which are googled on half-time. AG> P.S. With such simple questions - would be more correct to begin, for example with.NET and C# - there all it is easier, rather than in MFC. To begin it not about the HARDWARE, it already had 9 years ago 10 summer experience of development the Author: erslgoeirjh Date: 14.05.07, including on a C ++ and on MFC. ps: possibly too much forces leaves on search of enemies of the country

19

Re: What means virtual at function declaration in a class?

Hello, pilgrim _, you wrote: _> to Begin it not about the HARDWARE, it already had 9 years ago 10 summer experience of development the Author: erslgoeirjh Date: 14.05.07, including on a C ++ and on MFC. Generally a C ++ - such programming language which learn all life.

20

Re: What means virtual at function declaration in a class?

RF> Generally a C ++ - such programming language which learn all life. Well, well And some also learn to type in Google the text in a retrieval line all life... And still there are Blacks people who learn to read all life. A keyword "study". Did not learn and use, develop, grow over itself. And all "study" PS: if which who learns to read (learned, instead of "studied all life") that would be read by Spolski. It has about "all life With ++" an excellent thought. The pier "experience With ++ 5 years and up" is the full hogwash. For in With ++ there is nothing to "learn" more than for 2 years. If for 2 years  (to do to you in programming there is nothing. There are nuances, there are approaches, there are paradigms, there are certain methods of the decision of tasks (patterns) - but all it not from area   that that such "virtual"

21

Re: What means virtual at function declaration in a class?

Hello, RussianFellow, you wrote: RF> Hello, pilgrim _, you wrote: _>> to Begin it not about the HARDWARE, it already had 9 years ago 10 summer experience of development the Author: erslgoeirjh Date: 14.05.07, including on a C ++ and on MFC. RF> Generally a C ++ - such programming language which learn all life. In a C ++ much that is also it there are new possibilities. But - the keyword virtual in it was always and is basic concept at C programming ++ with OOP usage. And without OOP it is better to use a C instead of a C ++. Necessity permanently to learn something - a singularity of our trade. P.S. The Useful reference: https://yandex.ru/maps/20728/korolev/?l … AAAAAAAAAA

22

Re: What means virtual at function declaration in a class?

Hello, RussianFellow, you wrote: RF> Generally a C ++ - such programming language which learn all life. It NOT TRUTH! If you learn With ++ properly you will learn it. With ++ - a simple language, it is necessary to understand simply attentively as as works, not to be engaged in the voodoo programming, namely to understand. The nuance can be in libraries but if you know as language works to understand that the library does it is possible without problems.

23

Re: What means virtual at function declaration in a class?

Hello, pilgrim _, you wrote: _> Hello, AlexGin, you wrote: AG>> the Fat minus - the section revived for the account of children's questions which are googled on half-time. AG>> P.S. With such simple questions - would be more correct to begin, for example with.NET and C# - there all it is easier, rather than in MFC. _>... It already had 9 years ago 10 summer experience of development, including on a C ++ and on MFC. I looked this abstract: http://rsdn.org/forum/job.search/2485182.1 the Author: erslgoeirjh Date: 14.05.07... And long could not understand, what side here a companion asking about virtual? Then I understood that it about it _> ps: possibly too much forces leaves on search of enemies of the country Yes, in all at it Jews are guilty. In all branches IT they salted. This thought is old as the world. Anything new in it is not present. It after all Jews invented damned polymorphism on the HARDWARE head! The OUTPUT: If the HARDWARE read " Protocols of wise men" less, and would read books of Bjarna Straustrupa, Thom Svana, David Kruglinski, Dzhefri Richter more - then these children's questions we here would not see!

24

Re: What means virtual at function declaration in a class?

Hello, AleksandrN, you wrote: AN> Necessity permanently to learn something - a singularity of our trade. It yes. Concerning bookshops - "the Moscow house of the book" on New Arbate, "Biblio-globe" on Lubjanke, "the House of the technical book" on Leninsk the prospectus, "Moscow-book" on Tver, "Young guards" on the Clearing is better. And in the Queen in bookshops there is not enough interesting.

25

Re: What means virtual at function declaration in a class?

Hello, RussianFellow, you wrote: RF> Hello, AleksandrN, you wrote: AN>> Necessity permanently to learn something - a singularity of our trade. RF> it yes. RF> Concerning bookshops - "the Moscow house of the book" on New Arbate, "Biblio-globe" on Lubjanke, "the House of the technical book" on Leninsk the prospectus, "Moscow-book" on Tver, "Young guards" on the Clearing is better. RF> and in the Queen in bookshops there is not enough interesting. Houses of the technical book on Leninsk the prospectus, unfortunately, already are not present. Instead of it - branch of the house of the book on New Arbate in whom the assortment of the technical literature much less, than was in the House of the Technical Book. And more close to the Queen I can advise the house of the book "Medvedkovo" (Moscow, Zarevyj journey, . 12) and book department of computer shop the F-center (Moscow, Suhonsky street 7). Journey from the Queen - an electric train to a platform the Elk, then - by the bus 774 or an electric train to a platform Losinoostrovsky, further the bus 601. Earlier in these shops there was a quite good assortment of books on IT, but I there was not for a long time, probably something changed.