+ 5
What is struct (c++)
with some example
2 Respuestas
+ 13
// define a struct
struct MyStructure
{
int value1;
int value2;
};
int main()
{
// declare object of struct
MyStructure obj;
obj.value1 = 1;
obj.value2 = 2;
cout << obj.value1; //etc
}
+ 5
Difference b/w class & struct ??