I'm having a problem with my code. I'm trying to make a program that converts non integer numbers into binary. It returns an error in line 21 saying "invalid conversion from 'const char*' to 'char' [-fpermissive]". What does this mean and how can I solve it?
#include <iostream>
#include <string>
using namespace std;
int main(){
string number;
cout<<"Insert number";
cin>>number;
int continue = 0, integer;
bool first = false;
while(continue >= 0){
if(primo == false){
integer = number[continue];
first = true;
continue++;
}
else{
char dot = "."; //line 21
char comma = ",";
char check = number[continue];
if((check == comma) or (check == dot)){
continue = -1;
}
else{
int encapsulation = number[continue]
integer = (integer*10)+encapsulation;
continue++;
}
}
}
cout<<integer;
return 0;
}