const char to char

I cant seem to find where this conversion error is at

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 #include <iostream>
#include "birthday.h"
#include "people.h"
using namespace std;

template <class T>
class bob{
private:
    T first,second;
public:
    bob(T x,T y);
};

template <class T>
bob<T>::bob(T x, T y)
:first(x),second(y)
{
    cout<<first<<endl
            <<second<<endl;
}

template<>
class bob<char>{
public:
    bob(char x,char y)
    :first(x),second(y)
    {
        cout<<first<<endl
                <<second<<endl;
    }
private:
    char first,second;

};

int main()
{
bob<char> obj("h","i");

    return 0;
}
Use single quotes for characters. Double quotes are for strings.

 
bob<char> obj('h', 'i');
Topic archived. No new replies allowed.