[ create a new paste ] login | about

Link: http://codepad.org/2REQiE1e    [ raw code | output | fork ]

C, pasted on Mar 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <Windows.h>
#include <iostream>
#include <clocale>

int main()
{
  std::setlocale(LC_ALL, "Japanese_Jpn.932");

  LARGE_INTEGER frequency;
  BOOL ret = QueryPerformanceFrequency(&frequency);
  if (ret == 0) {
    std::wcerr << L"この計算機は高精度タイマーをサポートしていません。" << std::endl;
    return 1;
  }
  std::wcout << L"この計算機の高精度タイマー分解能は、" <<
      frequency.QuadPart << L" Hzです。" << std::endl;
}


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Line 20: error: Windows.h: No such file or directory
Line 19: error: iostream: No such file or directory
Line 18: error: clocale: No such file or directory
In function 'main':
Line 7: error: expected expression before ':' token
Line 9: error: 'LARGE_INTEGER' undeclared (first use in this function)
Line 9: error: (Each undeclared identifier is reported only once
Line 9: error: for each function it appears in.)
Line 9: error: expected ';' before 'frequency'
Line 10: error: 'BOOL' undeclared (first use in this function)
Line 10: error: expected ';' before 'ret'
Line 11: error: 'ret' undeclared (first use in this function)
Line 12: error: duplicate label 'std'
Line 7: error: previous definition of 'std' was here
Line 12: error: expected expression before ':' token
Line 15: error: duplicate label 'std'
Line 7: error: previous definition of 'std' was here
Line 15: error: expected expression before ':' token


Create a new paste based on this one


Comments: