0

I want to find all macro expansion location to replace the definition of macro.

I don't know what API I can use to get the macro expansion location.

#include <stdio.h>
#define NUM 5
int main(void)
{ 
  int i;
  int j = NUM;
  int a[NUM] = {0};
  printf("请输入%d个数:", j);
  for(i=0; i<NUM; ++i) {
    scanf("%d", &a[i] );
  }
  for(i=0; i<NUM; ++i) {
    printf("%d\x20", a[i]);
  }
  return 0;
}

I want to find all macro expansion location and replace them with 5.(4 location)

Valeriy Savchenko
  • 1,524
  • 8
  • 19
yxh
  • 5
  • 2

0 Answers0