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

Commit

Permalink
Update e3.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshitaverma authored Oct 23, 2022
1 parent 1f4ce8f commit 8ff9e6c
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions error_help/e3.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
A class can only contain variable or methods or nested class/union or enum
Error #3: Class contains something other than variables, methods, nested class/union or enum.

Example:-
class iterate_test:
variable:int=0
class nested_class:
...
enum nested_enum:
a,b,c
union nested_union:
x:int
y:float
def __init__(self,c):
...
A class can only contain variable or methods or nested class/union or enum.

Example:
class iterate_test:
int <variable_name> = 0;

class <nested_class>:
[Your code here]

enum <nested_enum>:
a,b,c

union <nested_union>:
x:int
y:float

def __init__(self,c):
[Your code here]

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

0 comments on commit 8ff9e6c

Please sign in to comment.