简体   繁体   English

作业澄清:字符串

[英]Homework Clarification: Character Strings

We have to implement a map, instruction reads: " The key for each entry is unique. The key for each entry is a character string. " 我们必须实现一个映射,指令如下:“ 每个条目的键是唯一的。每个条目的键是一个字符串。

So is the key a char or String or an array of char ? 那么键是char还是Stringchar数组?

It should be a string. 应该是一个字符串。 It is impossible to be a 'char' since 'char' cannot represent any string. 不可能是'char',因为'char'不能代表任何字符串。 In case of array of 'char', it should be clearly stated. 如果是“ char”数组,则应明确说明。

A character string is a series of characters represented by bits of code and organized into a single variable. 字符串是一系列由代码位表示并组织成单个变量的字符。 This string variable holding characters can be set to a specific length or analyzed by a program to identify its length. 可以将包含字符的字符串变量设置为特定长度,或者通过程序进行分析以识别其长度。

I think this quote can clarify your question, it should be a String 我认为这句话可以澄清您的问题,应该是一个String

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM