This definitely sounds like a job for a class not a struct. I'm surprised at the mixture of the STL with a struct that requires specific functionality. Is this an assignment for a class? If so, I wonder why your teacher isn't asking for a class with overloaded operators.
Structs are simpler. Structs are old. Structs are not as powerful.
If this isn't for homework, you should definetly use a class here. Take the extra time to figure it out, because this sort of functionality is exactly what classes ( well, all OOP really ) was designed to provide. You will need two functions that explicitly manage the data in your struct. It would be much better to design a simple class to provide this functionality. Writing a basic class for this will not be that hard, I assure you, and it will be a great exercise for expanding your programming abilities.
The STL (sets, vetctors, etc.) is a native C++ paradigm. I encourage you to embrace C++ classes as well. There is little reason to mix C style structs with C++ containers in this case.
It seems as if you are thinking structs in terms of C and not C++. In C++
you can do anything with structs that you can do with classes. The only difference
besides the keywords are that structs have public identifier by default, whereas classes
have private identifiers as default.
In this case, the data inside the struct is the interface of the type (see Plain-Old-Data types "POD"), there would be no point in hiding it in a class' or struct's private scope and providing some mutator / accessor methods. The only real difference between struct and class is in the minds of most programmers who tend to use struct as a simple "package" of data, with few methods, i.e., the data in the struct is the interface defining its purpose (to hold a bundle of associated data).
Just use the struct you have and implemented the required operators for it to work on a set<>. From the top of my head, you are required to have a valid copy-constructor, assignment operator and a less-than operator. The first two are provided by default by the compiler and in this case your struct is simple enough that the default will do just fine. So all you need is the less-than operator (and you might wanna add a few more useful comparison operators and others while you are at it).
Note that you can do what I did there( not make operator< a member function) because
all the members in the struct are public. If not then you would have to include the
boolean operator< as a member function.