Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
Update e4.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshitaverma authored Oct 23, 2022
1 parent 8ff9e6c commit 2622d95
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions error_help/e4.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
A virtual function can be declared inside a class only. Here is an example:-
Error #4: Virtual function cannot be declared outside the class.

class name:
virtual __init__(self):
...
A virtual function can only be declared inside a class.

Example:
class <name>:
virtual __init__(self):
[Your code here]

In the above example:
1. Text written between <> is changeable as per requirement.
2. Code goes between [].

0 comments on commit 2622d95

Please sign in to comment.