A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Linked List - Stikked
From corncob, 11 Years ago, written in C++.
Embed
  1. #include "IntArray.h"
  2.  
  3. CIntArray::CIntArray(void)//Khởi tạo mặc định
  4. {
  5.         m_Array=NULL;
  6.         m_Length=0;
  7. }
  8.  
  9. CIntArray::CIntArray(int len)//Khởi tạo với kích thước mảng đầu vào
  10. {
  11.         m_Length=len;
  12.         m_Array=new int[m_Length];
  13.         srand(time(NULL));//Gieo hạt giống ngẫu nhiên theo thời gian
  14.         //Giả sử giá trị ngẫu nhiên chỉ nằm trong phạm vi từ -50 đến 50 để tiện cho việc dubug
  15.         //Có thể thay đổi phạm vi khác theo yêu cầu
  16.         for(int i=0;i<m_Length;i++)
  17.                 m_Array[i]=rand()%101-50;//Gán giá trị ngẫu nhiên
  18. }
  19. CIntArray & CIntArray::operator =(const CIntArray &obj)//Xây dựng toán tử gán
  20. {
  21.         delete []m_Array;
  22.         m_Length=obj.m_Length;
  23.         m_Array=new int[m_Length];
  24.         for(int i=0;i<m_Length;i++)
  25.                 m_Array[i]=obj.m_Array[i];
  26.         return *this;
  27. }
  28. int & CIntArray::operator [](int i)//Xây dựng toán tử lấy giá trị []
  29. {
  30.         return m_Array[i];
  31. }
  32. ostream & operator << (ostream & Out,CIntArray &obj)//Toán tử trích dòng
  33. {
  34.         Out<<"Kich thuoc mang "<<obj.m_Length<<endl;
  35.         for (int i=0;i<obj.m_Length;i++)
  36.         {
  37.                 Out<<obj.m_Array[i]<<" ";
  38.         }
  39.         Out<<endl;
  40.         return Out;
  41. }
  42. istream & operator >> (istream & In,CIntArray &obj)//Toán tử nhập dòng
  43. {
  44.         if(obj.m_Length!=0)
  45.                 delete []obj.m_Array;
  46.         cout<<"Nhap vao so luong phan tu: ";
  47.         In>>obj.m_Length;
  48.         obj.m_Array=new int[obj.m_Length];
  49.         for (int i=0;i<obj.m_Length;i++)
  50.         {
  51.                 cout<<"a["<<i<<"]= ";
  52.                 In>>obj.m_Array[i];
  53.         }
  54.         return In;
  55.        
  56. }
  57. CIntArray::operator int *()//Toán tử chuyển đổi kiểu;
  58. {
  59.         int *newArray=new int[m_Length];
  60.         for(int i=0;i<m_Length;i++)
  61.         {
  62.                 newArray[i]=m_Array[i];
  63.         }
  64.         return newArray;
  65. }
  66. CIntArray::~CIntArray(void)
  67. {
  68.         if (m_Length!=0)
  69.                 delete []m_Array;
  70. }
  71.