Werbeanzeige
![]() |
C-/C++-Quelltext |
1 2 3 4 5 |
// Struktur füllen Bridge.vLeftBack = tbReadINIVector3(&cBridgeName, "LeftBack", "Data\\INI\\Bridge.ini"); Bridge.vRightBack = tbReadINIVector3(&cBridgeName, "RightBack", "Data\\INI\\Bridge.ini"); Bridge.vLeftFront = tbReadINIVector3(&cBridgeName, "LeftFront", "Data\\INI\\Bridge.ini"); Bridge.vRightFront = tbReadINIVector3(&cBridgeName, "RightFront", "Data\\INI\\Bridge.ini"); |
![]() |
C-/C++-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Liest einen tbVector3-Wert aus der INI-Datei tbVector3 tbReadINIVector3(char* pcSection, char* pcKey, LPCSTR cFile) { char acString[256]; tbVector3 vValue; // String lesen tbReadINIString(pcSection, pcKey, acString, 256, cFile); if (!strcmp(acString, "[NOT FOUND]")) return tbVector3(0.0f, 0.0f, 0.0f); // Die Vektorkomponenten extrahieren sscanf(acString, "%f, %f, %f", &vValue.x, &vValue.y, &vValue.z); return vValue; } |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Patrick Z.« (14.04.2017, 12:19)
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Patrick Z.« (13.04.2017, 15:22)
![]() |
C-/C++-Quelltext |
1 |
tbVector3 tbReadINIVector3(char* pcSection, char* pcKey, LPCSTR cFile); |
![]() |
C-/C++-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Liest einen tbVector3-Wert aus der INI-Datei tbVector3 tbReadINIVector3(char* pcSection, char* pcKey, LPCSTR cFile) { char acString[256]; tbVector3 vValue; // String lesen tbReadINIString(pcSection, pcKey, acString, 256, cFile); if (!strcmp(acString, "[NOT FOUND]")) return tbVector3(0.0f, 0.0f, 0.0f); // Die Vektorkomponenten extrahieren sscanf(acString, "%f, %f, %f", &vValue.x, &vValue.y, &vValue.z); return vValue; } |
Zitat
The calling convention is different between the function declaration and the function definition. Calling conventions (__cdecl, __stdcall, __fastcall, or __vectorcall) are encoded as part of the decorated name. Verify that the calling convention is the same.
Werbeanzeige