当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 如题 该如何设置用户名和密码呢? ......
 ·做asp网页需不需要学习sql语言    »显示摘要«
    摘要: 使用access 需要的话要学习到什么程序 还有sql server 和access什么关系 ......


超级才鸟问题

问题就是编写一个程序计算a*sqr(x)+bx+c的根  
  但我怎么也不知道如何在程序中实现根号啊?怎么找也找不到。谁能帮个忙啊回答一下  
  还有如何实现输入字符串后自动按照字母大小排列,就类似于字典中将各个单词按字母顺序排列。我能实现比较各个字符串的第一个字符来排列,但是到第二个字符好象那个stringcmp函数就不好用了,谁能写段代码示例,十分感谢。。。。

NO.1   作者: dddd8888

#include   <cmath>   or   <math.h>   or   <stdlib.h>  
  sqrt()

NO.2   作者: grooving

 
  #include   <string.h>  
  #include   <stdio.h>  
   
  char   string1[]   =   "The   quick   brown   dog   jumps   over   the   lazy   fox";  
  char   string2[]   =   "The   QUICK   brown   dog   jumps   over   the   lazy   fox";  
   
  void   main(   void   )  
  {  
        char   tmp[20];  
        int   result;  
        /*   Case   sensitive   */  
        printf(   "Compare   strings:\n\t%s\n\t%s\n\n",   string1,   string2   );  
        result   =   strcmp(   string1,   string2   );  
        if(   result   >   0   )  
              strcpy(   tmp,   "greater   than"   );  
        else   if(   result   <   0   )  
              strcpy(   tmp,   "less   than"   );  
        else  
              strcpy(   tmp,   "equal   to"   );  
        printf(   "\tstrcmp:       String   1   is   %s   string   2\n",   tmp   );  
        /*   Case   insensitive   */  
        result   =   _stricmp(   string1,   string2   );  
        if(   result   >   0   )  
              strcpy(   tmp,   "greater   than"   );  
        else   if(   result   <   0   )  
              strcpy(   tmp,   "less   than"   );  
        else  
              strcpy(   tmp,   "equal   to"   );  
        printf(   "\t_stricmp:     String   1   is   %s   string   2\n",   tmp   );  
  }


    摘要: cfiledialog xfile(true,"txt",null,0,"text files(*.txt)|*.txt|",null); m_filename=xfile.getfilename(); 请问各位,例如我要打开文本文件的名字是 la.txt 但是我要得到名字时m_filename的名字,我不想包括类型,只要得到la,不通过字符串处理......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE