C ++中前面的“L”是什么意思? [英] What does the 'L' in front a string mean in C++?

查看:132
本文介绍了C ++中前面的“L”是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

this->textBox1->Name = L"textBox1";

虽然似乎没有 L ,前缀的目的是什么?它的使用方式甚至对一个硬核C程序员没有意义。

Although it seems to work without the L, what is the purpose of the prefix? The way it is used doesn't even make sense to a hardcore C programmer.

推荐答案

对于扩展字符集,它是一个 wchar_t 维基百科对此主题和c ++示例有一点讨论。

It's a wchar_t literal, for extended character set. Wikipedia has a little discussion on this topic, and c++ examples.

这篇关于C ++中前面的“L”是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆