+ 1
#include <iostream> using namespace std; char(hack) { char hack; cout<<"which hacking do you wants to learn"<<hack<<endl; cin>>h
please tell what is wrong in this code
2 Respostas
+ 7
#include <iostream>
using namespace std;
int main(){
char hack;
cin>>hack;
cout<<"which hacking do you wants to learn: "<<hack<<endl;
}
Something like this, tho char will allow only 1 char as an input and not a string
0
#include<iostream>
#include<string>
using namespace std;
int main()
{
string hack;
cout << "which hack would you like learn" << endl;
getline(cin, hack);
return 0;
}