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;
This is a discussion on cannot convert 'int' to 'void * ' within the C++ Programming forums, part of the General Programming Boards category; when i try to compile the below code i get the following error cannot convert 'int' to 'void * ' ...
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);
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
thanks....i didnt notice that i put only 1 '>'..thanks dude