代码改变世界

c++多行字符串,可以这么写

2014-02-23 00:20  hongjiumu  阅读(7726)  评论(2编辑  收藏  举报
c++多行字符串,可以这么写:
CString s;
s.Format("CREATE TABLE %s(\
[ID] [int] IDENTITY(1,1) NOT NULL,\
[Vendor] [varchar](10) NULL,\
[System] [varchar](4) NULL,\
[FileType] [varchar](20) NULL,\
[VersionID] [int] NULL,\
[BSCNAME] [varchar](64) NULL,\
[RNCID] [int] NULL,\
[BSCFlg] [int] NULL,\
[IsValid] [bit] NULL,\
[VersionInfo] [VARCHAR](50) NULL,\
[Remark] [NVARCHAR](255) NULL,\
PRIMARY KEY CLUSTERED \
(\
[ID] ASC\
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]\
) ON [PRIMARY]", BSCFLG_TBLNAME.c_str());
m_pOdbc->ExecuteSql(s.GetString());
ADDLOG("--------------新建BSCFlg分配表--------------");
使用\更好!