코드 다이어리
  • 홈
  • 태그
  • 방명록
    • 분류 전체보기 (321)
      • 임베디드 (0)
        • 임베디드 C (0)
        • 이론 (0)
        • 하드웨어 (0)
      • 영상처리 (0)
        • 이론 (0)
      • 알고리즘 (121)
        • 자료구조와 알고리즘 (0)
        • 문제풀이 - 백준 (106)
        • 문제풀이 - 프로그래머스 (15)
      • 언어, 라이브러리 (66)
        • C, C++ (11)
        • Python (1)
        • JAVA (0)
        • Android (23)
        • Kotlin (10)
        • Qt (17)
        • Tkinter (2)
        • OpenCV (1)
        • Flutter (0)
      • 운영체제 (7)
        • Linux (3)
        • Windows (4)
      • 도구 (38)
        • Git (3)
        • Visual Studio Code (7)
        • MS Office (19)
        • GIMP (2)
        • etc (7)
      • 디버깅 (55)
        • C, C++ (15)
        • Android (21)
        • Qt (2)
        • Python (7)
        • Tkinter (2)
        • Flutter (1)
        • OpenCV (2)
        • 기타 (4)
        • Java (1)
      • 용어 (1)
      • 책 (4)
      • 컴퓨터 (5)
      • 블로그 (9)
      • 기타 (0)
      • 프로젝트 (15)
        • 앱 (14)
        • PC (1)
  • 글작성
  • 방명록
  • 환경설정
  • 메뉴 닫기
디버깅/C, C++

[C, C++] previously declared here 오류

오류내용 특정 변수, 함수에서 아래 오류내용 출력 previously declared here 오류원인 같은 이름으로 이전에 한번 선언된 변수를 다시 선언해서 발생한다. 비슷한 예로 이전에 정의된 변수를 다시 선언해도 오류가 발생한다. 2020.11.05 - [디버깅/C, C++] - [C, C++] error: redefinition of '~' / error: previous definition of '~' was here

2023. 1. 25. 20:49
디버깅/C, C++

[C, C++] error: function declaration isn't a prototype [-Werror=strict-prototypes]

오류내용 gcc컴파일러에서 잘 컴파일 되던 소스코드가 다른 컴파일러에서 아래 오류를 출력한다. error: function declaration isn't a prototype [-Werror=strict-prototypes] 해결 방법 함수 파라미터가 없을때 void를 넣어줘야 한다. bool Test(){...} // Fail bool Test(void){...} // OK

2023. 1. 25. 20:42
디버깅/C, C++

[C, C++] pointless comparison of unsigned integer with zero

오류 내용 아래 코드에서 오류 발생 unsigned int a = 10; if(a

2022. 8. 25. 20:18
디버깅/C, C++

[C, C++] error: explicit type is missing ("int" assumed)

오류 내용 error: explicit type is missing ("int" assumed) 오류 원인과 해결 extern 사용 시 자료형이 입력되지 않아 발생한 오류 // 오류코드 extern var; // 정상코드 extern int var;

2022. 3. 28. 20:46
디버깅/C, C++

[C, C++] expected primary-expression before ';' token

오류 내용 expected primary-expression before ';' token 오류 원인 #define 전처리기에 세미콜론을 포함하여 발생 #define abc 5; // fail #define abc 5 // success

2022. 2. 20. 20:38
디버깅/C, C++

[C, C++] error: initializer element is not constant

오류 로그 expression must have a constant value C/C++(28) error: initializer element is not constant 식에 상수 값이 있어야 합니다. 오류 코드 #include int a = 10; int b = 20; int arr[2] = {a, b}; int main() { } 오류 분석 전역 배열을 선언과 동시에 초기화할 때 상수가 아닌 변수값으로 초기화하면 위와 같은 오류가 발생한다. 따라서 아래와 같이 상수로 선언하면 오류가 발생하지 않는다. #include int a = 10; int b = 20; int arr[2] = {10, 20}; int main() { } 그리고 아래와 같이 배열을 지역변수로 초기화할 때는 상수가 아닌 값도 사..

2022. 1. 27. 21:06
  • «
  • 1
  • 2
  • 3
  • »

전체 카테고리

  • 분류 전체보기 (321)
    • 임베디드 (0)
      • 임베디드 C (0)
      • 이론 (0)
      • 하드웨어 (0)
    • 영상처리 (0)
      • 이론 (0)
    • 알고리즘 (121)
      • 자료구조와 알고리즘 (0)
      • 문제풀이 - 백준 (106)
      • 문제풀이 - 프로그래머스 (15)
    • 언어, 라이브러리 (66)
      • C, C++ (11)
      • Python (1)
      • JAVA (0)
      • Android (23)
      • Kotlin (10)
      • Qt (17)
      • Tkinter (2)
      • OpenCV (1)
      • Flutter (0)
    • 운영체제 (7)
      • Linux (3)
      • Windows (4)
    • 도구 (38)
      • Git (3)
      • Visual Studio Code (7)
      • MS Office (19)
      • GIMP (2)
      • etc (7)
    • 디버깅 (55)
      • C, C++ (15)
      • Android (21)
      • Qt (2)
      • Python (7)
      • Tkinter (2)
      • Flutter (1)
      • OpenCV (2)
      • 기타 (4)
      • Java (1)
    • 용어 (1)
    • 책 (4)
    • 컴퓨터 (5)
    • 블로그 (9)
    • 기타 (0)
    • 프로젝트 (15)
      • 앱 (14)
      • PC (1)
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

전체 방문자

오늘
어제
전체

태그

  • #Android
  • #티스토리
  • #git
  • #c
  • #삼성
  • #엑셀
  • #완전탐색
  • #QT
  • #DFS
  • #cout
  • #stl
  • #BFS
  • #큐
  • #DP
  • #알고리즘
  • #프로그래머스
  • #cpp
  • #visual studio code
  • #백준
  • #안드로이드
  • #시뮬레이션
  • #코틀린
  • #코딩 테스트
  • #임베디드
  • #파워포인트
  • #BOJ
  • #레벨3
  • #우선순위 큐
  • #Kotlin
  • #c++
더보기+
Powered by Privatenote/Lifekorea Copyright © 코드 다이어리 All rights reserved. TistoryWhaleSkin3.4

티스토리툴바