답안 #7551

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
7551 2014-08-11T06:33:30 Z gs13068 행성 탐사 (GA8_planet) C++
컴파일 오류
0 ms 0 KB
#include “planet.h”

int calls = 0;

int my_row(int r)
{
  calls++;
  return count_row(r);
}

int my_col(int c)
{
  calls++;
  return count_col(c);
}

void ainta()
{
  paint(0,0);
}

void sangsoo()
{
  int x, y;
  for(x=0;x<2222;x++)if(my_row(x))break;
  for(y=0;y<2222;y++)if(my_col(y))break;
  report(x,y);
}

Compilation message

planet.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
planet.cpp: In function 'int my_row(int)':
planet.cpp:8:21: error: 'count_row' was not declared in this scope
planet.cpp: In function 'int my_col(int)':
planet.cpp:14:21: error: 'count_col' was not declared in this scope
planet.cpp: In function 'void ainta()':
planet.cpp:19:12: error: 'paint' was not declared in this scope
planet.cpp: In function 'void sangsoo()':
planet.cpp:27:13: error: 'report' was not declared in this scope
planet.cpp: In function 'int my_col(int)':
planet.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
planet.cpp: In function 'int my_row(int)':
planet.cpp:9:1: warning: control reaches end of non-void function [-Wreturn-type]
grader.c: In function 'void count_increment(const char*)':
grader.c:74:103: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat]
grader.c:74:103: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char*' [-Wformat]
grader.c: In function 'int main()':
grader.c:146:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]