3.1 Syntax and semantic errors

주홍영·2022년 3월 11일
0

Learncpp.com

목록 보기
38/199

https://www.learncpp.com/cpp-tutorial/syntax-and-semantic-errors/

이번 챕터에서는 디버깅에 대해서 다룬다
보통 디버그 툴이 IDE에서 제공되고 디버깅은 c++ standard가 아니다
따라서 이번 챕터도 전체적으로 빠르게 훑는 것을 목적으로 한다

A syntax error occurs when you write a statement that is not valid according to the grammar of the C++ language. This includes errors such as missing semicolons, using undeclared variables, mismatched parentheses or braces, etc…

syntax error는 c++ 규칙에 어긋나는 오류를 뜻한다
syntax라는 말이 문법을 의미한다

반면에 Semantic error
statement는 syntactically valid 하지만
does not do what the programmer intended, 프로그래머가 의도한 대로 동작하지 않는 경우
즉, 코드의 로직을 잘못 구성했거나 작동 방식으로 의도와 다르게 결과가 도출될 경우를 뜻한다

단어장

prevalent : 일반적인, 널리 퍼진, 만연한?
ex) Software errors are prevalent

profile
청룡동거주민

0개의 댓글