反应本机UIExplorer示例不在设备上构建

时间:2016-08-03 06:19:43

标签: ios xcode react-native

我能够在Xcode的模拟器上构建React原生示例应用程序UIExplorer,但在设备上构建它会产生错误

#include<stdio.h>
#include<stdlib.h>
int main()
{
    FILE *fp;
    int count;
    int i;

    fp = fopen ("fruits.txt", "w");
    if(fp == NULL)
    {
        printf("Can't open file!!");
        exit(0);
    }
    fputs("4 Apple Banana mango berry", fp);
    fclose(fp);*/

    fp = fopen("fruits.txt", "r");
    if(fp == NULL)
    {
        printf("Can't open file!!");
        exit(0);
    }

    fscanf(fp, "%d", &count);
    printf("%d\n", count);

    fclose(fp);
    char *fruits[count]; // This line is giving Segmentation fault.

    return 0;
} 

截图 Screenshot

0 个答案:

没有答案