Compile Error

foo.cc:6:21: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    6 | if (isset($_SESSION['admin']) && $_SESSION['admin'] === true) {
      |                     ^~~~~~~
foo.cc:6:44: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    6 | if (isset($_SESSION['admin']) && $_SESSION['admin'] === true) {
      |                                            ^~~~~~~
foo.cc:11:14: warning: multi-character literal with 14 characters exceeds 'int' size of 4 bytes
   11 | if ($_SERVER['REQUEST_METHOD'] === 'POST') {
      |              ^~~~~~~~~~~~~~~~
foo.cc:11:36: warning: multi-character character constant [-Wmultichar]
   11 | if ($_SERVER['REQUEST_METHOD'] === 'POST') {
      |                                    ^~~~~~
foo.cc:15:20: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   15 |     $name = $_POST['username'];
      |                    ^~~~~~~~~~
foo.cc:16:24: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   16 |     $password = $_POST['password'];
      |                        ^~~~~~~~~~
foo.cc:27:23: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   27 |             $_SESSION['admin'] = true;
      |                       ^~~~~~~
foo.cc:28:23: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   28 |             $_SESSION['username'] = $name;
      |                       ^~~~~~~~~~
foo.cc:31:33: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   31 |             if (isset($_SESSION['repage'])) {
      |                                 ^~~~~~~~
foo.cc:32:49: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   32 |                 header("Location: " . $_SESSION['repage']);
      |                                                 ^~~~~~~~
foo.cc:1:1: error: expected unqualified-id before ‘<’ token
    1 | <?php
      | ^
foo.cc:6:1: error: expected unqualified-id before ‘if’
    6 | if (isset($_SESSION['admin']) && $_SESSION['admin'] === true) {
      | ^~
foo.cc:11:1: error: expected unqualified-id before ‘if’
   11 | if ($_SERVER['REQUEST_METHOD'] === 'POST') {
      | ^~
foo.cc:45:1: error: expected unqualified-id before ‘?’ token
   45 | ?>
      | ^

信息

递交者
类型
递交
题目
P1012 谁的孙子最多
语言
C++
递交时间
2025-07-21 08:13:32
评测时间
2025-07-21 08:13:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes