when i try to compile the below code i get the following error
cannot convert 'int' to 'void * '
gets(name);cin>>age>>number;
gets(batstyle);
cin>>runs>>inn>catches>>hs>>half_cent>>cent;
Printable View
when i try to compile the below code i get the following error
cannot convert 'int' to 'void * '
gets(name);cin>>age>>number;
gets(batstyle);
cin>>runs>>inn>catches>>hs>>half_cent>>cent;
First, don't use gets! EVER!
Second, there's not enough code here to say. Copy your entire code and the exact errors you are receiving.
Although, if this isn't a typo, this is a problem:
Code:inn>catches
Don't use gets/fgets in a C++ environment. A good substitute is std::string and std::getline:
std::string name;
std::getline(std::cin, name);
thanks....i didnt notice that i put only 1 '>'..thanks dude