can someone tell me how can i add data into my list of class with C++ please ?
#include <string>
class Person
{
private:
std::string Name;
public:
Person();
~Person();
std::string GetName()
{
return Name;
}
std::string SetName(std::string name)
{
name = Name;
return name;
}
};
void main()
{
list<Person> lp = new list<Person>();
Person p = new Person();
p.Name = "Smith";
lp.insert(p);
}
this is my attempt. Can someone correct me or give me another answer ? Thanks
` for all of this. Honestly you probably need more than Stack Overflow is going to offer. This isn't *really* a language tutorial site. May I suggest you peruse [The Definitive C++ Book Guide and List](https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list).
– WhozCraig May 03 '15 at 23:34