频道栏目
首页 > 资讯 > 其他综合 > 正文

程序员的进化——从学生到首席执行官

04-11-10        来源:[db:作者]  
收藏   我要投稿

一剑西来注:呵呵

这个没编程基础都看不懂

 

--------------------------------------------------------------------------------
中学阶段

          10 PRINT "HELLO WORLD"
          20 END
--------------------------------------------------------------------------------
大学一年级

          program Hello(input, output)
            begin
              writeln(‘Hello World‘)
            end.
--------------------------------------------------------------------------------
大学高年级

          (defun hello
            (print
              (cons ‘Hello (list ‘World))))
--------------------------------------------------------------------------------
初级程序员

          #include <stdio.h>
          void main(void)
          {
            char *message[] = {"Hello ", "World"};
            int i;

            for(i = 0; i < 2; ++i)
              printf("%s", message[i]);
            printf(" ");
          }
--------------------------------------------------------------------------------
编程老鸟

          #include <iostream.h>
          #include <string.h>

          class string
          {
          private:
            int size;
            char *ptr;

          public:
            string() : size(0), ptr(new char(‘‘)) {}

            string(const string &s) : size(s.size)
            {
              ptr = new char[size + 1];
              strcpy(ptr, s.ptr);
            }

            ~string()
            {
              delete [] ptr;
            }

            friend ostream &operator <<(ostream &, const string &);
            string &operator=(const char *);
          };

          ostream &operator<<(ostream &stream, const string &s)
          {
            return(stream << s.ptr);
          }

          string &string::operator=(const char *chrs)
          {
            if (this != &chrs)
            {
              delete [] ptr;
             size = strlen(chrs);
              ptr = new char[size + 1];
              strcpy(ptr, chrs);
            }
            return(*this);
          }

          int main()
          {
            string str;

            str = "Hello World";
            cout << str << end

            return(0);
          }
--------------------------------------------------------------------------------
编程高手

          [
          uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
          ]
          library LHello
          {
              // bring in the master library
              importlib("actimp.tlb");
              importlib("actexp.tlb");

              // bring in my interfaces
              #include "pshlo.idl"

              [
              uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
          &nbs

相关TAG标签
上一篇:我的程序员之路
下一篇:程序员的“十大安全技巧”
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站