What is a struct, and how can I use it?
thanks
struct pickles(){
int var
int var2
int var3
int var4
}
skydereign wrote:Classes aren't in c, so saying its similar to a class doesn't help anyone who doesn't know what either is. In c++ classes and structs are very similar, but classes have a different default permissions (public versus private data). In c++ you can also create member functions which helps create a more object oriented approach, which is notably absent in c.
struct var_name
{
int variables;
};
struct something() {
ints
}
struct person ()
{
int age=0;
};
struct person
{
int age;
};
Users browsing this forum: No registered users and 1 guest