我正在使用TCC的latest version(tcc-0.9.26-win64-bin.zip)。出于某种原因,此代码的输出不是我期望的(相同)。
#include <stdio.h>
struct CELL {
int row;
int col;
};
typedef struct CELL Cell;
Cell newCell(const int row, const int col) {
printf("Input %d %d\n", row, col);
Cell cell;
cell.row = row;
cell.col = col;
return cell;
}
int main(int argc, char *argv[]) {
Cell cell = newCell(2, 5);
printf("Output %d %d\n", cell.row, cell.col);
}
我用:
运行脚本C:\tcc\tcc.exe -run D:\cell.c
它在eval中工作得很好,所以我做错了什么?
答案 0 :(得分:4)
它在eval中工作得很好,所以我做错了什么?
无。使用gcc对我来说很好。