23 JOBS OF THE FUTURE (and jobs that have no future)
If you can't live with a const char* then you better copy the char array like
You can convert a char type simply by assigning to an int.
int search(char *text1, char *text2); is wrong and doesn't match to the function definition. Use correct one
This question already has answers here: Converting int to char in C (7 answers).
char char_arr [100]; int num = 42; sprintf(char_arr, "%d", num); char_arr now is the string "42". sprintfautomatically adds the null character \0 to
int a = 65; char c = (char) a; Note that since characters are smaller in size than integer, this casting may cause a loss of data. It's better to declare the character variable as unsigned in this case (though you may still lose data).
I am trying to convert an integer to a char.. How can I do this..?
list.add(list1) else list.add(list2); // Метод для сравнения строк: 'а' больше чем 'b' public static boolean isGreaterThan(String a, String b) { return a.compareTo(b) > 0; } // Переданная строка - это число? public static boolean isNumber(String s) { if (s.length() == 0) { return false; } char[] chars...