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
C-/C++-Quelltext |
|
1 2 3 4 |
int main(int _argc, char** _argv) noexcept { asm volatile("lock cmpxchg8b %eax"); return 0; } // ::main |
Community-Fossil
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 |
class Var{ public: union val{ bool b; int i; float f; std::string* str; }; INSTRUCTIONS type; val value; Var(const bool b){ type = BOL; value.b = b; value.str = 0; } Var(const int i){ type = INT; value.i = i; value.str = 0; } Var(const float f){ type = FLT; value.f = f; value.str = 0; } Var(std::string &s){ type = STR; value.str = &s; } ~Var(){ delete value.str; } }; |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 |
class Var{ INSTRUCTIONS type; // INT, FLT, BOL, STR std::size_t index; } vector<int> ints; vector<float> floats; // ... vector<Var*> vars; stack<Var*> stack; |
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »DeKugelschieber« (21.06.2014, 19:31)
C-/C++-Quelltext |
|
1 2 3 4 |
int main(int _argc, char** _argv) noexcept { asm volatile("lock cmpxchg8b %eax"); return 0; } // ::main |
C-/C++-Quelltext |
|
1 2 3 4 |
int main(int _argc, char** _argv) noexcept { asm volatile("lock cmpxchg8b %eax"); return 0; } // ::main |
Community-Fossil
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 |
if(type == INT){ a->value.int += b->value.int; } else if(type == FLOAT){ a->value.float += b->value.float; } // ... |
Quellcode |
|
1 |
_x = 1+(1 < 2) # ergibt 2 :D |
Alter Hase
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Techie« (22.06.2014, 01:28)
C-/C++-Quelltext |
|
1 2 3 4 |
int main(int _argc, char** _argv) noexcept { asm volatile("lock cmpxchg8b %eax"); return 0; } // ::main |
Alter Hase
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Techie« (22.06.2014, 16:37)
Werbeanzeige