您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ strconcat函数代码示例

51自学网 2021-06-03 08:28:26
  C++
这篇教程C++ strconcat函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中strconcat函数的典型用法代码示例。如果您正苦于以下问题:C++ strconcat函数的具体用法?C++ strconcat怎么用?C++ strconcat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了strconcat函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: get_oldroot_path

static char *get_oldroot_path (const char *path){  while (*path == '/')    path++;  return strconcat ("/oldroot/", path);}
开发者ID:shaded-enmity,项目名称:bubblewrap,代码行数:7,


示例2: mboxname_lock

/* get a database handle to the alarm db */EXPORTED sqldb_t *caldav_alarm_open(){    /* already running?  Bonus */    if (refcount) {        refcount++;        return my_alarmdb;    }    /* we need exclusivity! */    int r = mboxname_lock("$CALDAVALARMDB", &my_alarmdb_lock, LOCK_EXCLUSIVE);    if (r) {        syslog(LOG_ERR, "DBERROR: failed to lock $CALDAVALARMDB");        return NULL;    }    char *dbfilename = strconcat(config_dir, "/caldav_alarm.sqlite3", NULL);    my_alarmdb = sqldb_open(dbfilename, CMD_CREATE, DBVERSION, upgrade);    if (!my_alarmdb) {        syslog(LOG_ERR, "DBERROR: failed to open %s", dbfilename);        mboxname_release(&my_alarmdb_lock);    }    free(dbfilename);    refcount = 1;    return my_alarmdb;}
开发者ID:RaymondPo,项目名称:cyrus-imapd,代码行数:29,


示例3: flush_log

void CScriptStorage::flush_log(){	string_path			log_file_name;	strconcat           (sizeof(log_file_name),log_file_name,Core.ApplicationName,"_",Core.UserName,"_lua.log");	FS.update_path      (log_file_name,"$logs$",log_file_name);	m_output.save_to	(log_file_name);}
开发者ID:2asoft,项目名称:xray,代码行数:7,


示例4: xr_strlen

void CScriptEngine::process_file_if_exists	(LPCSTR file_name, bool warn_if_not_exist){	u32						string_length = xr_strlen(file_name);	if (!warn_if_not_exist && no_file_exists(file_name,string_length))		return;	string256				S,S1;	if (m_reload_modules || (*file_name && !namespace_loaded(file_name))) {		FS.update_path		(S,"$game_scripts$",strconcat(S1,file_name,".script"));		if (!warn_if_not_exist && !FS.exist(S)) {#ifdef DEBUG#	ifndef XRSE_FACTORY_EXPORTS			if (psAI_Flags.test(aiNilObjectAccess))#	endif			{				print_stack			();				Msg					("* trying to access variable %s, which doesn't exist, or to load script %s, which doesn't exist too",file_name,S1);				m_stack_is_ready	= true;			}#endif			add_no_file		(file_name,string_length);			return;		}#ifndef MASTER_GOLD		Msg					("* loading script %s",S1);#endif // MASTER_GOLD		m_reload_modules	= false;		load_file_into_namespace(S,*file_name ? file_name : "_G");	}}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:30,


示例5: xr_strcpy

    virtual void	Execute	(LPCSTR args)	{        CCC_Token::Execute	(args);        string_path		_cfg;        string_path		cmd;        switch	(*value)	{        case 0:            xr_strcpy(_cfg, "rspec_minimum.ltx");            break;        case 1:            xr_strcpy(_cfg, "rspec_low.ltx");            break;        case 2:            xr_strcpy(_cfg, "rspec_default.ltx");            break;        case 3:            xr_strcpy(_cfg, "rspec_high.ltx");            break;        case 4:            xr_strcpy(_cfg, "rspec_extreme.ltx");            break;        }        FS.update_path			(_cfg,"$game_config$",_cfg);        strconcat				(sizeof(cmd),cmd,"cfg_load", " ", _cfg);        Console->Execute		(cmd);    }
开发者ID:Zen13L,项目名称:xray-16,代码行数:26,


示例6: jmapauth_open

EXPORTED int jmapauth_open(struct db **dbptr, int db_flags, const char *fname){    int r = 0;    char *tofree = NULL;    assert(dbptr);    if (!fname) {        fname = config_getstring(IMAPOPT_JMAPAUTH_DB_PATH);    }    /* create db file name */    if (!fname) {        tofree = strconcat(config_dir, FNAME_JMAPAUTH, (char*)NULL);        fname = tofree;    }    /* open the database */    r = cyrusdb_open(DB, fname, db_flags, dbptr);    if (r) {        if (r != CYRUSDB_NOTFOUND) {            syslog(LOG_ERR, "JMAP auth: cannot open db %s: %s",                    fname, cyrusdb_strerror(r));        }        return r;    }    free(tofree);    return r;}
开发者ID:nicolan,项目名称:cyrus-imapd,代码行数:30,


示例7: make_url

/* Create a LDAP URL from DN and FILTER and return it in URL.  We don't   need the host and port because this will be specified using the   override options. */static gpg_error_tmake_url (char **url, const char *dn, const char *filter){  gpg_error_t err;  char *u_dn, *u_filter;  char const attrs[] = (USERCERTIFICATE ","/*                         USERSMIMECERTIFICATE "," */                        CACERTIFICATE ","                        X509CACERT );  *url = NULL;  u_dn = escape4url (dn);  if (!u_dn)      return gpg_error_from_errno (errno);  u_filter = escape4url (filter);  if (!u_filter)    {      err = gpg_error_from_errno (errno);      xfree (u_dn);      return err;    }  *url = strconcat ("ldap:///", u_dn, "?", attrs, "?sub?", u_filter, NULL);  if (!*url)    err = gpg_error_from_syserror ();  else    err = 0;  xfree (u_dn);  xfree (u_filter);  return err;}
开发者ID:gilbert-fernandes,项目名称:gnupg,代码行数:37,


示例8: strconcat

void CUIStatsListItem::XmlInit(const char *path, CUIXml &uiXml){	CUIXmlInit	xml_init;//	CUIStatic	*pStatic;	CUIButton	*pButton;	string256 buf;	strconcat(sizeof(buf),buf, path, ":static");	int tabsCount = uiXml.GetNodesNum(path, 0, "static");	XML_NODE* tab_node = uiXml.NavigateToNode(path,0);	uiXml.SetLocalRoot(tab_node);	for (int i = 0; i < tabsCount; ++i)	{		pButton = xr_new<CUIButton>();		pButton->SetAutoDelete(true);		xml_init.InitStatic(uiXml, "static", i, pButton);		pButton->SetTextAlignment(CGameFont::alLeft);		AttachChild(pButton);		FieldsVector.push_back(pButton);	}	FieldsVector[0]->SetElipsis(CUIStatic::eepEnd, 0);}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:26,


示例9: duplicate_init

/* must be called after cyrus_init */EXPORTED int duplicate_init(const char *fname){    int r = 0;    char *tofree = NULL;    if (!fname)        fname = config_getstring(IMAPOPT_DUPLICATE_DB_PATH);    /* create db file name */    if (!fname) {        tofree = strconcat(config_dir, FNAME_DELIVERDB, (char *)NULL);        fname = tofree;    }    r = cyrusdb_open(DB, fname, CYRUSDB_CREATE, &dupdb);    if (r != 0) {        syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,               cyrusdb_strerror(r));        goto out;    }    duplicate_dbopen = 1;out:    free(tofree);    return r;}
开发者ID:Distrotech,项目名称:cyrus-imapd,代码行数:28,


示例10: quotadb_open

EXPORTED void quotadb_open(const char *fname){    int ret;    char *tofree = NULL;    int flags = CYRUSDB_CREATE;    if (!fname)        fname = config_getstring(IMAPOPT_QUOTA_DB_PATH);    /* create db file name */    if (!fname) {        tofree = strconcat(config_dir, FNAME_QUOTADB, (char *)NULL);        fname = tofree;    }    if (config_getswitch(IMAPOPT_IMPROVED_MBOXLIST_SORT))        flags |= CYRUSDB_MBOXSORT;    ret = cyrusdb_open(QDB, fname, flags, &qdb);    if (ret != 0) {        syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,               cyrusdb_strerror(ret));            /* Exiting TEMPFAIL because Sendmail thinks this               EC_OSFILE == permanent failure. */        fatal("can't read quotas file", EC_TEMPFAIL);    }    free(tofree);    quota_dbopen = 1;}
开发者ID:Distrotech,项目名称:cyrus-imapd,代码行数:31,


示例11: make_host_part

/* Build the remote part or the URL from SCHEME, HOST and an optional   PORT.  Returns an allocated string or NULL on failure and sets   ERRNO.  */static char *make_host_part (const char *scheme, const char *host, unsigned short port){  char portstr[10];  char *hostname;  char *hostport;  /* Map scheme and port.  */  if (!strcmp (scheme, "hkps") || !strcmp (scheme,"https"))    {      scheme = "https";      strcpy (portstr, "443");    }  else /* HKP or HTTP.  */    {      scheme = "http";      strcpy (portstr, "11371");    }  if (port)    snprintf (portstr, sizeof portstr, "%hu", port);  else    {      /*fixme_do_srv_lookup ()*/    }  hostname = map_host (host);  if (!hostname)    return NULL;  hostport = strconcat (scheme, "://", hostname, ":", portstr, NULL);  xfree (hostname);  return hostport;}
开发者ID:Domikk,项目名称:gnupg,代码行数:36,


示例12: make_fs_dir

static char *make_fs_dir (const char *root,             const char *dir,             mode_t mode){  char *full, *start, *slash;  while (*dir == '/')    dir++;  full = strconcat (root, "/", dir);  start = full + strlen (root) + 1;  do    {      slash = strchr (start, '/');      if (slash != NULL)        *slash = 0;      if (mkdir (full, mode) < 0 &&          errno != EEXIST)        fatal ("mkdir_all %s", full);      if (slash != NULL)        {          *slash = '/';          start = slash + 1;        }    }  while (slash != NULL);  return full;}
开发者ID:alexlarsson,项目名称:run-merged,代码行数:35,


示例13: has_conflict

static inthas_conflict (char **dirs, int n_dirs, const char *filename, int except){  char *path;  int all_dirs = 1;  int conflict = 0;  struct stat st;  int i;  for (i = 0; i < n_dirs; i++)    {      if (dirs[i] == NULL || i == except)        continue;      path = strconcat (dirs[i], "/", filename);      if (lstat (path, &st) < 0)        continue;      conflict = 1;      if (!S_ISDIR (st.st_mode))        all_dirs = 0;    }  if (!conflict)    return NO_CONFLICTS;  if (all_dirs)    return DIR_CONFLICT;  return NON_DIR_CONFLICT;}
开发者ID:alexlarsson,项目名称:run-merged,代码行数:31,


示例14: UpdateAnimCount

void CControlAnimationBase::UpdateAnimCount(){    CKinematicsAnimated *skel = smart_cast<CKinematicsAnimated*>(m_object->Visual());    for (ANIM_ITEM_VECTOR_IT it = m_anim_storage.begin(); it != m_anim_storage.end(); it++)	{        if (!(*it)) continue;        // проверить, были ли уже загружены данные        if ((*it)->count != 0) return;        string128	s, s_temp;        u8 count = 0;        for (int i=0; ; ++i) {            strconcat	(sizeof(s_temp),s_temp, *((*it)->target_name),itoa(i,s,10));            LPCSTR		name	= s_temp;            MotionID	id		= skel->ID_Cycle_Safe(name);            if (id.valid())  {                count++;                AddAnimTranslation(id,name);            }            else break;        }        if (count != 0) (*it)->count = count;        else {            sprintf_s(s, "Error! No animation: %s for monster %s", *((*it)->target_name), *m_object->cName());            R_ASSERT2(count != 0, s);        }    }}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:32,


示例15: abort

void CreateLog			(BOOL nl){    no_log				= nl;    strconcat			(logFName,Core.ApplicationName,"_",Core.UserName,".log");    if (FS.path_exist("$logs$"))        FS.update_path	(logFName,"$logs$",logFName);    if (!no_log) {        IWriter *f		= FS.w_open	(logFName);        if (f==NULL) {            MessageBox	(NULL,"Can't create log file.","Error",MB_ICONERROR);            abort();        }        FS.w_close		(f);    }    LogFile.reserve		(128);    // Calculating build    time_t	Time;    time	(&Time);    int build=0, mnum=0, dnum, ynum, mcnt;    char mon[4];    char buf[128];    strcpy(buf,__DATE__);    sscanf(buf,"%s %d %d",mon,&dnum, &ynum);    for (int i=0; i<12; i++) {        if (stricmp(month[i],mon)==0) mnum=i;    }    for (mcnt=6; mcnt<mnum; mcnt++) build+=day_in_month[mcnt];    build+=dnum;    Msg("'%s' build %d, %s/n","xrCore",build+(ynum-1999)*365, __DATE__);}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:31,


示例16:

CMotionDef *CControlAnimationBase::get_motion_def(SAnimItem *it, u32 index){    string128			s1,s2;    CKinematicsAnimated	*skeleton_animated = smart_cast<CKinematicsAnimated*>(m_object->Visual());    const MotionID		&motion_id = skeleton_animated->ID_Cycle_Safe(strconcat(sizeof(s2),s2,*it->target_name,itoa(index,s1,10)));    return				(skeleton_animated->LL_GetMotionDef(motion_id));}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:7,


示例17: WriteServerHeader

voidWriteServerHeader(FILE *file, const statement_t *stats){    register const statement_t *stat;    const char *protect = strconcat(SubsystemName, "_server_");    WriteProlog(file, protect);    for (stat = stats; stat != stNULL; stat = stat->stNext)	switch (stat->stKind)	{	  case skRoutine:	    WriteServerRoutine(file, stat->stRoutine);	    break;	  case skImport:	  case skSImport:	    WriteImport(file, stat->stFileName);	    break;	  case skUImport:	    break;	  default:	    fatal("WriteServerHeader(): bad statement_kind_t (%d)",		  (int) stat->stKind);	}    WriteEpilog(file, protect);}
开发者ID:Prajna,项目名称:mach,代码行数:25,


示例18: list_game_with_geolocation

// calculate the list of players for a given game with geolocationstatic char* list_game_with_geolocation(const struct game * g){    char list_game_str[8192] = "";    int i;    char* n;    for (i = 0; i < g->players_number; i++) {        strconcat(list_game_str, g->players_nick[i], sizeof(list_game_str));        n = geoloc[g->players_conn[i]];        if (n != NULL) {            strconcat(list_game_str, ":", sizeof(list_game_str));            strconcat(list_game_str, n, sizeof(list_game_str));        }        if (i < g->players_number - 1)            strconcat(list_game_str, ",", sizeof(list_game_str));    }    return memdup(list_game_str, strlen(list_game_str) + 1);}
开发者ID:csjewell,项目名称:frozen-bubble,代码行数:18,


示例19: CommandSaveBackup

CCommandVar CActorTools::CommandSaveBackup(CCommandVar p1, CCommandVar p2){	string_path 		fn;    strconcat			(sizeof(fn), fn, Core.UserName, "_backup.object");    FS.update_path		(fn,"$objects$",fn);    ExecCommand			(COMMAND_SAVE,xr_string(fn));    return TRUE;}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:8,


示例20: strconcat

void CScriptDebugger::Eval(const char* strCode, char* res, int res_sz){	string1024 strCodeFull;	strCodeFull[0] = 0;	const char * r = "return  ";	strconcat(sizeof(strCodeFull),strCodeFull,r,strCode);	m_lua->Eval(strCodeFull, res, res_sz);}
开发者ID:2asoft,项目名称:xray,代码行数:8,


示例21: addHeader

/** * addHeader() prepends a header to @msg according to @version * @param msg char** to which the header should be prepended * @param version int protocol version to use * @return int length of message with header */int addHeader(char** msg, int version) {    if (version == 1155) {        char header[12];        int len = 11 + strlen(*msg);        sprintf(header, "1155~%05i~", len);        char* oldmsg = *msg;        *msg = strconcat(header, *msg);        free(oldmsg);        return len;    } else if (version == 1154) {        char header[] = "1154~";        char* oldmsg = *msg;        *msg = strconcat(header, *msg);        free(oldmsg);        return strlen(*msg);            }}
开发者ID:macm00v,项目名称:vmcam,代码行数:23,


示例22:

void CStalkerAnimationState::Load				(CKinematicsAnimated *kinematics, LPCSTR base_name){	string256			S;	m_global.Load		(kinematics,base_name);	m_torso.Load		(kinematics,strconcat(sizeof(S),S,base_name,"torso_"));	m_movement.Load		(kinematics,base_name);	m_in_place->Load	(kinematics,base_name);}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:8,


示例23: WriteUserHeader

voidWriteUserHeader(FILE *file, statement_t *stats){	register statement_t *stat;    const char *protect = strconcat(SubsystemName, "_user_");	WriteProlog(file, protect, TRUE, TRUE);	for (stat = stats; stat != stNULL; stat = stat->stNext)		switch (stat->stKind)		{		case skImport:		case skUImport:		case skDImport:			WriteImport(file, stat->stFileName);			break;		case skRoutine:		case skSImport:		case skIImport:			break;		default:			fatal("WriteHeader(): bad statement_kind_t (%d)",				  (int) stat->stKind);		}    fprintf(file, "/n#ifdef __BeforeMigUserHeader/n");	fprintf(file, "__BeforeMigUserHeader/n");	fprintf(file, "#endif /* __BeforeMigUserHeader *//n");	fprintf(file, "/n");	fprintf(file, "#include <sys/cdefs.h>/n");	fprintf(file, "__BEGIN_DECLS/n");	fprintf(file, "/n");	for (stat = stats; stat != stNULL; stat = stat->stNext) {		if (stat->stKind == skRoutine)			WriteUserRoutine(file, stat->stRoutine);	}	fprintf(file, "/n");	fprintf(file, "__END_DECLS/n");	fprintf(file, "/n");	fprintf(file, "/********************** Caution **************************//n");	fprintf(file, "/* The following data types should be used to calculate  *//n");	fprintf(file, "/* maximum message sizes only. The actual message may be *//n");	fprintf(file, "/* smaller, and the position of the arguments within the *//n");	fprintf(file, "/* message layout may vary from what is presented here.  *//n");	fprintf(file, "/* For example, if any of the arguments are variable-    *//n");	fprintf(file, "/* sized, and less than the maximum is sent, the data    *//n");	fprintf(file, "/* will be packed tight in the actual message to reduce  *//n");	fprintf(file, "/* the presence of holes.                                *//n");	fprintf(file, "/********************** Caution **************************//n");	fprintf(file, "/n");	WriteRequestTypes(file, stats);	WriteUserRequestUnion(file, stats);	WriteReplyTypes(file, stats);	WriteUserReplyUnion(file, stats);	WriteEpilog(file, protect, TRUE);}
开发者ID:outbackdingo,项目名称:uBSD,代码行数:58,


示例24: more_global

voidmore_global(void){  if (SubsystemName == strNULL)    fatal("no SubSystem declaration");  if (UserHeaderFileName == strNULL)    UserHeaderFileName = strconcat(SubsystemName, ".h");  else if (streql(UserHeaderFileName, "/dev/null"))    UserHeaderFileName = strNULL;  if (UserFileName == strNULL)    UserFileName = strconcat(SubsystemName, "User.c");  else if (streql(UserFileName, "/dev/null"))    UserFileName = strNULL;  if (ServerFileName == strNULL)    ServerFileName = strconcat(SubsystemName, "Server.c");  else if (streql(ServerFileName, "/dev/null"))    ServerFileName = strNULL;  if (ServerDemux == strNULL)    ServerDemux = strconcat(SubsystemName, "_server");  if (ServerImpl == strNULL)    ServerImpl = strconcat(SubsystemName, "_impl");  if (ServerSubsys == strNULL) {    if (ServerPrefix != strNULL)      ServerSubsys = strconcat(ServerPrefix, SubsystemName);    else      ServerSubsys = SubsystemName;    ServerSubsys = strconcat(ServerSubsys, "_subsystem");  }}
开发者ID:outbackdingo,项目名称:uBSD,代码行数:35,



注:本文中的strconcat函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ strcopy函数代码示例
C++ strcoll函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。