에 구조체를 통과 내가 뭐하는 거지입니다 :C++ : 함수 여기
구조체는 single.h 파일에 정의되어:이 구조체는 single.cpp 파일
에 사용되는typedef struct
{
double x,y,z;
}PhysicalSize;
PhysicalSize physicalSize;
physicalSize.x = xstageStepSize;
physicalSize.y = ystageStepSize;
physicalSize.z = zstageStepSize;
long SaveTIFFWithOME(wchar_t *filePathAndName, char * pMemoryBuffer, long width, long height, unsigned short * rlut, unsigned short * glut,unsigned short * blut,
double umPerPixel,int nc, int nt, int nz, double timeIncrement, int c, int t, int z,string * acquiredDateTime,double deltaT,
string * omeTiffData, AcquireSingle::PhysicalSize physicalSize)
나는 함수를 밟았으며 모두 physicalSize.x, physicalSize.y and physicalSize.z
이 올바른 값을 얻은 것으로 보입니다. 그러나, 내가 SaveTIFFWithOME()
이라고했을 때, 모두 physicalSize.x, physicalSize.y and physicalSize.z
은 결코 초기화되지 않는 것처럼 보입니다.
내가 어디에서 잘못했는지, 구조체를 인수로 함수에 전달하는 것이 올바른지 궁금하다. 감사.
'SaveTIFFWithOME' 안에 우리를 보여주세요. – 0x499602D2
@ DieterLücking : 완전히 유효한 C++입니다. 그것은 매우 관용적이지 않습니다. –
비록 그것은 c struct가 아니라 C++ struct입니다. 중요한 차이 – Paranaix