在文件 CarArray(没有任何扩展名)中,我有这样的数组(这是一个非常简化的版本):
NSString *cars[5][3] = {
{@"1A", @"1B", @"1C"},
{@"2A", @"2B", @"2C"},
{@"3A", @"3B", @"3C"},
{@"4A", @"4B", @"4C"},
{@"5A", @"5B", @"5C"}
}
现在我想从多个文件中的数组中读取数据,所以我只需使用#import "CarArray"
我使用循环来读取数据。然后我收到这样的错误:
duplicate symbol _cars in:
/Users/Adam/Library/Developer/Xcode/DerivedData/Auto_Center-hgjlsqanvyynncgyfzuorxwchqov/Build/Intermediates/Auto Center.build/Debug-iphonesimulator/Auto Center.build/Objects-normal/i386/DetailViewController.o
/Users/Adam/Library/Developer/Xcode/DerivedData/Auto_Center-hgjlsqanvyynncgyfzuorxwchqov/Build/Intermediates/Auto Center.build/Debug-iphonesimulator/Auto Center.build/Objects-normal/i386/ModelListViewController.o
ld: 1 duplicate symbol for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我该如何解决这个问题?