0

Hi!

I have had to change from Python to C because of university instructions. My problem is that, when I want to make a menu for my program or whatever, I always want to define classes:P

My question is simple --> are structures the best way to "replace" classes?

TY

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by gerard4143
0

Hi!

I have had to change from Python to C because of university instructions. My problem is that, when I want to make a menu for my program or whatever, I always want to define classes:P

My question is simple --> are structures the best way to "replace" classes?

TY

Well yes...if you think of structures as classes without methods and constructor/destructors

Well if you want to get technical - a structure can contain a pointer to a function which is kind of like a method(in the loosest definition)

Edited by gerard4143: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.