Answers for "what is const char* c++"

C++
2

std string to const char * c++

std::string a = "string";
const char* b = a.c_str();
Posted by: Guest on November-12-2020
1

c++ char define

// syntax: 
// char <variable-name>[] = { '<1st-char>',  '<2nd-char>', ... , '<Nth-char>', ''}; 

// example (to store 'Hello' in the YourVar variable): 
char YourVar[] = {'H','e','l','l','o',''}; // NOTE: the  marks the end of the char array
Posted by: Guest on April-29-2020

Browse Popular Code Answers by Language