ошибка: неверное преобразование из "const char *" в "char" [-fpermissive] [duplicate]
This question already has an answer here:
invalid conversion from ‘const char*’ to ‘char’ 2 answers#include<stdio.h>
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
class base {
public:
int lookup(char c);
}; // class base
int base::lookup(char c)
{
cout << c << endl;
} // base::lookup
int main() {
base b;
char c = "i";
b.lookup(c);
} // main
При компиляции кода выше я получаю ошибку ниже:
g++ -c test.cpp test.cpp: In function ‘int main()’: test.cpp:20:10: error: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive]