Best way to check if a character array is empty?

Which is the most reliable way to check if a character array is empty? char text[50]; if(strlen(text) == 0) {} o...

Unclosed Character Literal error?

Got the error "Unclosed Character Literal" , using BlueJ, when writing: class abc { public static void main(Stri...

Can the char type be categorized as an integer??

Just now I read "char is the only unsigned integral primitive type in Java." Does this mean the char is one of the i...

Process exited prematurely with a SIGSEGV signal?

This code shows this SIGSEGV error, which I understand, is a segmentation error. Can someone please help! The code r...

Check if a string contains only a set of letters?

I'm trying to check if a word contains only a set of letters such as I,O,S,H and X Suppose the user enters: SSHX, th...

std::string to char*?

I want to convert a std::string into a char* or char[] data type. std::string str = "string"; char* chr = str; Re...