Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Quellcode |
|
1 |
std::ifstream dat_ein; |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
__int64 lvl_start; __int64 lvl_end; __int64 lvl_data; std::string dateiname = ("list.txt"); std::ifstream dat_ein; dat_ein.open(dateiname.c_str()); while(lvl_start != lvl_data) { dat_ein >> lvl_data; } dat_ein >> exp; |
Quellcode |
|
1 |
error C2679: Binaerer Operator '>>' : Kein Operator definiert, der einen rechtsseitigen Operator vom Typ '__int64' akzeptiert (oder keine geeignete Konvertierung moeglich) |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
case ID_BTN_UEBERNEHMEN: { char szText[256]; char szText1[256]; char szText3[256]; __int64 lvl_start; __int64 lvl_end; __int64 lvl_data; __int64 exp; __int64 dif; __int64 bb; // Text aus der Editbox holen GetWindowText (hEditBox, szText, 256); GetWindowText (hEditBox2, szText3, 256); lvl_start = atoi (szText); lvl_end = atoi(szText3); if(lvl_start >= 100 || lvl_start <= -1 || lvl_end >= 100 || lvl_start <= -1) { int Resultat; Resultat = MessageBox (hWnd, "Please chose your lvl from lvl 0 to lvl 100!", "Wrong lvl!", MB_OK | MB_ICONINFORMATION); if (Resultat == IDOK) { lvl_start = 0; lvl_end = 0; return (0); } lvl_start = 0; lvl_end = 0; } //lvl datenbank, addieren etc... std::string dateiname = ("list.txt"); std::ifstream dat_ein; dat_ein.open(dateiname.c_str()); if(!dat_ein) { int Resultat; Resultat = MessageBox (hWnd, "list.txt could not be opened!", "Error opening a file!", MB_OK | MB_ICONERROR); if (Resultat == IDOK) { return (0); } } while(lvl_start != lvl_data) { dat_ein >> lvl_data; } dat_ein >> exp; dif = lvl_end - lvl_start; /*if( dif==1) { cout << endl << w<< exp << x<< endl; goto ende; }*/ for( dif = dif-1; dif >= 0; --dif) { dat_ein >> lvl_data; dat_ein >> bb; exp=exp+bb; } //cout << endl << w<< exp << x <<endl; //lvl datenbank ende... itoa(exp,szText1,10); SetWindowText (hText6, szText1); return (0); } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 |
#if _MSC_VER <= 1200 inline std::istream& operator>>( std::istream& stream, __int64& value ) { char buff[ 20 ]; stream >> buff; value = _atoi64( buff ); return stream; } #endif |
Werbeanzeige