集合怎么写? ( 积分: 50 )

P

pascal

Unregistered / Unconfirmed
GUEST, unregistred user!
我的集合定义:
1.
typedef std::set <char, '$', 'Z'> CharSet;
//不对在哪啊?
2.
typedef std::set <char> TCharSet;
TCharSet CharSet;
CharSet.Clear();
CharSet<<'A';
//错在哪里?该怎么写?'operator<<' not implemented in type 'TCharSet' for arguments of type 'char'
 
我的集合定义:
1.
typedef std::set <char, '$', 'Z'> CharSet;
//不对在哪啊?
2.
typedef std::set <char> TCharSet;
TCharSet CharSet;
CharSet.Clear();
CharSet<<'A';
//错在哪里?该怎么写?'operator<<' not implemented in type 'TCharSet' for arguments of type 'char'
 
通过:
#include <sysset.h>
typedef Set <char, '$', 'Z'> TCharSet;
CharSet.Clear();
CharSet<<'$'<<'%'<<'*'<<'-'<<'0'<<'1'<<'2'<<'3'<<'4'<<'5'<<'6'<<'7'<<'8'<<'9'<<'0';
CharSet<<'A'<<'B'<<'C'<<'D'<<'E'<<'F'<<'G'<<'H'<<'I'<<'J'<<'K'<<'L'<<'M'<<'N';
CharSet<<'O'<<'P'<<'Q'<<'R'<<'S'<<'T'<<'U'<<'V'<<'W'<<'X'<<'Y'<<'Z';
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
722
import
I
I
回复
0
查看
609
import
I
I
回复
0
查看
656
import
I
顶部