C/C++ 언어 void 포인터의 사용 예제 프로그램


1
2
3
4
5
6
7
8
9
10
11
12
13
/* void 포인터의 사용 예제 프로그램 */
#include <stdio.h>
 
void main(void) {
  char text[80]="silla";
  void *vp=text;
 
  *(char *)vp = 'S';
  ((char *)vp)[1= 'I';
  ((char *)vp)[2= 'L';
  printf("%s\n", text);
}
 
cs


C/C++ 언어 void 포인터의 사용 예제 프로그램



+ Recent posts