السلام عليكم
أين الخطأ في هذا الكود ؟
#include <iostream>
using namespace std;
#include<string>
using std::string;
class books
{
public :
books (string name)
{
setname(name);
}
void setname(string name)
{
bookname=name;
}
string getname()
{
return bookname;
}
private :
string bookname;
};
int main()
{
books math ;
math.books(name);
cout<<math.getname();
cout<<endl;
return 0;
}