Answers for "how to turn a char*[] to an int*[] cpp"

C++
8

convert string to char c++

// "std::string" has a method called "c_str()" that returns a "const char*"
// pointer to its inner memory. You can copy that "const char*" to a variable
// using "strcpy()".

std::string str = "Hello World";
char buffer[50];

strcpy(buffer, str.c_str());

std::cout << buffer;	//Output: Hello World

//POSTED BY eferion ON STACK OVERFLOW (IN SPANISH).
Posted by: Guest on December-08-2020
1

char to int in c++

char a = '4';
int ia = a - '0';
Posted by: Guest on August-01-2021

Browse Popular Code Answers by Language