| View previous topic :: View next topic |
| Author |
Message |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Mar 29, 2022 11:37 pm Post subject: Can Class can't be used? |
|
|
Can't use Class? :cry: [/img]
| Description: |
|
| Filesize: |
25.01 KB |
| Viewed: |
1086 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25855 Location: The netherlands
|
Posted: Wed Mar 30, 2022 12:10 am Post subject: |
|
|
no.
it's C , not C++
but you can of course implement a pseudo class:
| Code: |
typedef struct
{
int myage;
} _myclass, *myclass;
|
myclass createMyClass() allocates memory the size of _myclass and return that pointer as a myclass
and then create a class method like:
| Code: |
void myclass_say(myclass this)
{
printf("my age is %d\n", this->myage),
}
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
Last edited by Dark Byte on Wed Mar 30, 2022 8:07 am; edited 1 time in total |
|
| Back to top |
|
 |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Wed Mar 30, 2022 1:38 am Post subject: |
|
|
| Dark Byte wrote: | no.
it's C , not C++
but you can of course implement a pseudo class:
| Code: |
typedef struct
{
int myage;
} _myclass, *myclass;
|
myclass createMyClass() allocates memory the size of _myclass and return that pointer as a myclass
and then create a class method like:
| Code: |
void myclass_say(myclass this)
{
printf("my age is %d\n", this->myage),
}
|
|
Great! :D
|
|
| Back to top |
|
 |
|