I need to assign an array of 6 arrays and its type set[maxSetLength]
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#define maxSetLength 129
typedef short int set[maxSetLength];
int _tmain(int argc, _TCHAR* argv[]){
int i;
set a={0},b={0},c={0},d={0},e={0},f={0};
set sets[6]={a,b,c,d,e,f};
}
CodeBlocks compiles without errors; in VS2010, this is not so, and these are errors:
6 times
error C2440: 'initializing' : cannot convert from 'set' to 'short'
6 times
IntelliSense: a value of type "short *" cannot be used to initialize an entity of type "short"
12 Errors in general
source
share