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

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)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.