zoukankan      html  css  js  c++  java
  • C语言中打印返回值

    demo:

     ----return :返回值------------------

                 

             int mosquitto_username_pw_set(struct mosquitto *mosq, const char *username, const char *password)
                  {
                          if(!mosq) return MOSQ_ERR_INVAL;

                       if(mosq->username){
                       _mosquitto_free(mosq->username);
                      mosq->username = NULL;
                        }
                      if(mosq->password){
                     _mosquitto_free(mosq->password);
                     mosq->password = NULL;
                   }

                  if(username){
                       mosq->username = _mosquitto_strdup(username);
                      if(!mosq->username) return MOSQ_ERR_NOMEM;
                 if(password){
                      mosq->password = _mosquitto_strdup(password);
                      if(!mosq->password){
                      _mosquitto_free(mosq->username);
                      mosq->username = NULL;
                     return MOSQ_ERR_NOMEM;
                 }
             }
         }
                    return MOSQ_ERR_SUCCESS;
      }

    //----------------------------------------------------------------------------------------------------

        void main(void){

               int x=1;

                    x= mosquitto_username_pw_set(mosq, username, password);
                    printf("----------------------------------------------data= %d ",x);
                    printf("username= %s ",username);

    }

  • 相关阅读:
    java中set集合的常用方法
    Java的Collection集合的常用方法
    Java集合Collection&Map
    Linux设置中文语言的一种方式
    struts2自定义Interceptor拦截器
    Linux系统官网下载
    idea绿色版+谷歌浏览器绿色版——设置打开jsp文件
    torch.nn.Embedding
    负对数似然(negative log-likelihood)
    Pytorch系列教程-使用Seq2Seq网络和注意力机制进行机器翻译
  • 原文地址:https://www.cnblogs.com/dpf-learn/p/6963648.html
Copyright © 2011-2022 走看看