Hi, i just started trying to learn c++ a week ago, so i hope you excuse my basic question, and i hope you keep your answers basic as well :)
Anyways, i have tried making basic vektors with numbers, which have not been a problem, but now im trying to make a string with characters, and my compiler just doesnt understand me. I hope someone has an answer for me
#include<iostream>
#include<conio.h>
usingnamespace std;
int main ()
{
bool ok=false;
char teck[18]={A,T,V,R,E,L,I,C,K,a,t,v,r,e,l,i,c,k};
char let;
cout<<"Enter a character, or the number '0' to exit: ";
cin>>let;
if (let==0)
{
cout<<"You're done'";
getch();
return 0;
}
for (int i=0;i<18;i++)
if (teck[i]==let)
{
ok=true;
break;
}
if (ok)
cout<<"Your character is in the list!"<<endl;
else
cout<<"Youre character is not in the list"<<endl;
getch();
return 0;
}