c++ 用指针的指针输出字符串

#include 
using namespace std;


int main()
{
	const char* week[] = { "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday" };
	const char** p = week;
	for (size_t i = 0; i < 7; i++)
	{
		cout << *(p + i) << endl;
	}
	return 0;
}

 

你可能感兴趣的:(C++)