hi everyone,i Have posted a code where i have created a structure in which i am defining bitfields.
If suppose for the object testvar[2][K] i wanna assign
{1,1,1},{1,0,1},should i assign them individually or can i assign at once like testvar[1][K].testa=7; //for {1,1,1}
testvar[2][k].testa=5;//for{1.0,1}
please help me,
#include<conio.h>
#include<string.h>
#include<iostream.h>
#define K 3
struct test
{
char testa:6;
char testb:10;
}
testvar[2][K];
int main()
{
//How do i assign value to the object testvar[2][K]???
getch();
return 0;
}