#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
On Compiling above code I am getting below error :
g++ -c test.cpp test.cpp: In function ‘int main()’: test.cpp:20:10: error: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive]