how can i do this ?
the error was lvalue required.
#include<iostream.h>
#include<sting.h>
#include<conio.h>
#include<stdio.h>
struct movies_t {
char title[50];
int year;
} mine, yours;
void printmovie (movies_t movies_t);
main ()
{
clrscr();
struct movies_t mine, yours;
mine.title="The Curious Case of Benjamin Button";
mine.year=2008;
cout<<"Enter title:";
gets(yours.title);
cout<<"Enter year:";
cin>>yours.year;
cout<<"My Favorite movie is:<<endl";
printmovie (mine);
cout<<"And yours is:\endl";
printmovie (yours);
getch();
return 0;
}
void printmovie (movies_t movie)
{
cout<<movie.title;
cout<< " ("<<movie.year<<")\n";
}
Tnx