i was told objects can be created in C just like c++. Does anyone happen to have any examples of how this is done or any recommended resources on this :) thx
lochnessmonster
0
Junior Poster
Recommended Answers
Jump to Posti was told objects can be created in C just like c++.
Objects are really just lumping data and functions that operate on the data into one package. In C you can't have member functions, but you can have pointers to functions:
#include <stdio.h> typedef struct foo …
All 2 Replies
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Narue
5,707
Bad Cop
Team Colleague
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.