extern

    1

    1답변

    나는 다음과 같은 C++ 공유 라이브러리 작성했습니다에 C#을에서 외부 메소드를 호출 using System; using System.Runtime.InteropServices; namespace MatinChess { class MainClass { const string MatinChessDLL = "libMatinC

    0

    4답변

    이 이상한 동작을 만났을 때 extern 키워드 (C)으로 놀고있었습니다. 나는 두 개의 파일이 있습니다 file1.c에서를 #include<stdio.h> int main() { extern int a; a=10; printf("%d",a); return 0; } 와 file2.c const int a=100;

    -1

    1답변

    내 C++ 코드에는 이와 같은 정의가 있습니다. class A { int i; public: void setI(int temp) { i = temp; } }; extern A* a; 그런 다음 변수의 값을 인수로 채우는 함수가 있습니다. inline void Func() { ... // Stream

    0

    1답변

    내가 //file ppmformat.h namespace imaging { Image * ReadPPM(const char * filename); } //namespace imaging ppmformat.h라는 이름의 파일에 함수를 선언 ... 내가 얻을 static imaging::Image * imaging::ReadPPM(const char

    3

    1답변

    #ifdef가있는 C 헤더 파일 선언과 변수 및 함수 앞에 extern의 의미를 알고 있습니다. /* "lib.h" */ #ifndef LIB_H_ #define LIB_H_ #ifdef LIB_C void function1(); /* ... */ #else extern void function1

    -4

    2답변

    main.cpp의 "string OS"에 연결된 값을 "Methods.cpp"의 함수/메소드를 사용하는 "Gameplay.cpp"파일로 전달해야합니다. 나는 다섯 개 가지 파일이 있습니다 MAIN.CPP Methods.cpp Methods.hpp Gameplay.cpp Gameplay.hpp 에서을 main.cpp : Gameplay.cpp에서 #inclu

    0

    1답변

    임베디드 프로젝트를 진행하고 있지만 제 질문은 일반적인 모범 사례에 대한 것입니다. 마이크로 컨트롤러에서 주변 장치를 작동시킬 소스 파일을 작성 중이고 헤더 파일에서 올바르게 작동하기 위해 필요한 두 개의 버퍼를 선언했습니다. 그들은가 ISR 내부 작동되어 있기 때문에 문맥 조금만 extern volatile struct my_buffer periphera

    0

    1답변

    코드가 오류없이 컴파일되었으므로 네임 스페이스 내부 및 외부에서 extern 함수를 선언하는 것과 다른 점을 알고 싶습니다. --a.h-- namespace mynamespace { extern void foo(); } --a.c-- namespace mynamespace { void foo(){ dosomething;

    -3

    1답변

    extern int i; void add(); int main() { add(); if (i == 0) printf("scope rules\n"); } void add() { int i; } I도 변수 i가 추가 기능 에 정의되어 있지만,이 경우 extern 키워드를 알려줍니다 extern int i

    0

    2답변

    다른 팀의 코드 중 하나의 큰 코드에서 우리 팀의 다른 코드로 일부 클래스를 이식하려고합니다. 원래 이전 프로그램에는 모든 사람이 사용할 수있는 전역 변수 "rawdata"가있었습니다. 그러나 일부 클래스를 이식 할 때, 수석은 "rawdata"를 주요 클래스에 넣고 해당 생성자를 사용하여 "rawdata"를 초기화하라고했습니다. (그는 가능한 한 적은 전