ryusgnal
Advanced Member level 4
Hi I'm still new in C++ programming. can anybody tell me what is the problem with my code below and how to solve it? thank you very much.
#include <iostream.h>
#include <string.h>
char hello[6],ref;
main()
{
hello[6] = 'h','e','l','l','0','!';
ref='l';
if(strcmp(hello[2],ref)==0)
{cout<<"yes";}
else
{cout<<"no";}
return 0;
}
#include <iostream.h>
#include <string.h>
char hello[6],ref;
main()
{
hello[6] = 'h','e','l','l','0','!';
ref='l';
if(strcmp(hello[2],ref)==0)
{cout<<"yes";}
else
{cout<<"no";}
return 0;
}