| |

VerySource

 Forgot password?
 Register
Search
View: 919|Reply: 5

Why must a VC custom class have a base class?

[Copy link]

4

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Localhost

Post time: 2020-1-7 11:30:01
| Show all posts |Read mode
I just started learning VC, right-click and select "new class" in the class view to add a class. As a result, not only must I enter a class name, but I also have to choose a base class, but my class is just an entity class, and I don't need to inherit any other features. . How to remove this restriction? There is no such requirement in C #, thank you!
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-8 00:54:01
| Show all posts
Choose generic class
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-8 08:36:01
| Show all posts
Not necessarily
The definition is based on MFC class, you need to choose the base class
Define general class, choose generic class, you don't need to be based on MFC class
Reply

Use magic Report

1

Threads

27

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-1-8 14:00:01
| Show all posts
Insert-> New Class-> generic class
Or build a .cpp and .h and then join the project.
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-15 23:00:02
| Show all posts
Agree with LZ
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-26 14:15:01
| Show all posts
Thank you, Lord, I was just about to ask this question. It turned out that some enthusiastic people have already answered it.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list