Category : char

I am currently doing a college project and most of my background comes from JS & Python. I have an Arduino that is receiving data and using ArduinoJSON to take in settings and deserialize them. I have it set up that the setting is a const char* setting. Which can contain a range of data ..

Read more

when any array(of int or char type) is made like this char a[]="hello"; int b[20]; then is there two pointer variables made a and b which points to start of array?? and if yes then why this gives an error if i do as following char a[]; a="hello"; but in case of following no error ..

Read more

I’m always wondering about the complaint of the compiler when I declare and define a char*-variable. char* myChar = "Char"; The compiler will complain that it cannot convert const char* to char*. It need an explicit conversion like char* myChar = (char*)"Char"; My first question is if this is the correct way to initialize a ..

Read more

I’m having problems with comparing two strings in case-insesitive way. I’ve tried lots of methods(functions) like strcasecmp, stricmp, strcmpi, etc. I had imported the libraries where those functions belong but still it can’t seem to detect them. Here is my code: #include <bits/stdc++.h> #include <string.h> #include <cstring> #include <mem.h> using namespace std; int main() { ..

Read more