I am absolute beginner for c++ running through some code and faced below code
bool SomeFunction (const char* x, char* y, int z)
{
//some code
}
now i want to pass value to the arguments for the above method
how to pass value to const char* X argument ?
and I am not understanding what is this ? is this pointer to char ?
Thanks
const char*
is indeed a point to a char
. However, since strings are no more than a char
array with a \\0
at the end, this is usually used to pass strings:
SomeFunction ("hello", "world", 12);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.