i'm wondering for this question i'm not exactly sure what it is asking me to do:
Consider the following struct definition
struct Triangle
{
double sideA, sideB, sideC;
};
Write a definition isEquilateral that when passed a Triangle object “myTriangle” returns true if the triangle IS equilateral (all sides are equal) and false otherwise.
It's not asking for a function so does that mean it involves nested structures? If so, how do i proof equality in a nested structure?
Are you sure, the previous questions, asked to 'Complete the following functions', 'define the following functions' so I thought this would be different...
Okay... on second thought, maybe it's asking for a function that takes a reference pointer to a struct as an argument that will modify a boolean value inside it called isEquilateral. Or maybe the first now crossed out one...
This is ridiculously ambiguous, and I'd ask that a few other forum members help you out on this one.
One thing's for sure: you can't store functions in structs.
EDIT: Oh, and you need to declare a myTriangle somewhere.