- 积分
- 10838
- 威望
- 326
- 金钱
- 1
- 阅读权限
- 100
- 性别
- 男
- 在线时间
- 1984 小时
|
关于c或c++。(问题来了求教)
char *line1[LINE_ANZHAL][LINE_LANGE];
//pins
strcpy(line1[1][LINE_LANGE],"//-*-verilog-*-\n");
strcpy(line1[2][LINE_LANGE],"`timescale 1ns / 1ps\n");
strcpy(line1[3][LINE_LANGE],"module test;\n");
strcpy(line1[4][LINE_LANGE]," parameter simulator=\"spectre\"; //;\n");
strcpy(line1[5][LINE_LANGE]," parameter model=\"slow\";\n");
if ((fp1=fopen(name,"w"))==NULL)
{
printf ("Datei kann nicht erzeugt werden\n");
exit (-1);
}
else
{
fputs (*line1[1],fp1);
fputs (*line1[2],fp1);
fputs (*line1[3],fp1);
fputs (*line1[4],fp1);
fputs (*line1[5],fp1);
//pins
请问上面关于line1数组的定义和使用那地方不对。为什么有warning C4700: local variable 'line1' used without having been initialized ?而且运行结果也不对。
[ Last edited by jaojing on 2005-12-5 at 13:22 ] |
|