char* in char umwandeln
-
Kuggugg!
Wenn du die Puffergröße in Bytes kennst, hier n, auf die dein
char* Bytes
zeigt, kannst du dir jedes einzelne Byte anzeigen lassen:#include <iostream> using namespace std; int main() { char* Bytes = "Hallo Echo"; int n = 10; for ( int i = 0; i < n; i++ ) cout << Bytes[i] << endl; return 0; }Gruß.
-
Achso und umwandeln brauchst du auch nichts, weil dein Zeiger schon auf char Zeigt.
... char c; for ( int j = 0; j < n; j++ ) { c = Bytes[j]; } ...
-
ihr seit super, danke.

-
Entspricht
c= *(Bytes+j);dann dem
c= Bytes[j];oder irre ich mich
-
Du irrst dich nicht.

-
Nein, du irrst dich nicht. Und das ganze entspricht:
c = j[ Bytes ];
-
< Stuss Detection Successfully >
David_pb schrieb:
Nein, du irrst dich nicht. Und das ganze entspricht:
c = j[ Bytes ];
at 10:01:36 15.06.2007
-
Stuss Detector [active] schrieb:
< Stuss Detection Successfully >
-
Stuss Detector [active] schrieb:
< Stuss Detection Successfully >
David_pb schrieb:
Nein, du irrst dich nicht. Und das ganze entspricht:
c = j[ Bytes ];
at 10:01:36 15.06.2007
Wenn man keine Ahnung hat dann bitte, bitte nicht schreiben, ja?
-
Stuss Detector [active] schrieb:
< Stuss Detection Successfully >
David_pb schrieb:
Nein, du irrst dich nicht. Und das ganze entspricht:
c = j[ Bytes ];
at 10:01:36 15.06.2007
Nein, ist leider tatsächlich so:
bytes[j] == *(bytes + j) == *(j + bytes) == j[bytes]
-
< Soul-Searching Completed >
< Stuss Database Actualized >
< c = j[ Bytes ]; Removed >at 12:37:14 15.06.2007