Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

tux:typecasting [2011/11/30 20:01]
wikisysop [Explizite Typumwandlung]
tux:typecasting [2011/11/30 20:02] (aktuell)
wikisysop [Explizite Typumwandlung]
Zeile 44: Zeile 44:
  int_pointer = int_array;  int_pointer = int_array;
  
- for(i=0; i < 5; i++) { // iterate through the int array with the int_pointer + for(i=0; i < 5; i++) {  
- printf("​[integer pointer] points to %p, which contains the integer %d\n", ​ + printf("​[integer pointer] points to %p, which contains the integer %d\n", int_pointer,​ *int_pointer);​
-            ​int_pointer,​ *int_pointer);​+
  int_pointer = int_pointer + 1;  int_pointer = int_pointer + 1;
  }  }
   
- for(i=0; i < 5; i++) { // iterate through the char array with the char_pointer + for(i=0; i < 5; i++) {  
- printf("​[char pointer] points to %p, which contains the char '​%c'​\n", ​ + printf("​[char pointer] points to %p, which contains the char '​%c'​\n",​ char_pointer,​ *char_pointer);​
-            ​char_pointer,​ *char_pointer);​+
  char_pointer = char_pointer + 1;  char_pointer = char_pointer + 1;
  }  }
tux/typecasting.1322679675.txt.gz (3807 views) · Zuletzt geändert: 2011/11/30 20:01 von wikisysop
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0