hemanthjv
Newbie level 4
- Joined
- Apr 24, 2013
- Messages
- 6
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,322
#include<stdio.h>
#define msize 4096
struct memory
{
int a[msize];
};
void main()
{
struct memory m;
m.a[0]=250; // temperature value of 25,0
m.a[4]=01; // heater status OFF
m.a[8]=240; // temperature value of 24,0
m.a[12]=00; // heater status ON
m.a[16]=220; // temperature value of 22,0
m.a[20]=00; // heater status ON
read(&m
);
}
void read(struct memory m)
{
int i;
for(i=0;i<sizeof(msize);i++)
{
scanf("%d", m.a);
}
}
the code is showing error in void read function as first defined here .
Please some one also help me to convert this read value to ASCII ??
#define msize 4096
struct memory
{
int a[msize];
};
void main()
{
struct memory m;
m.a[0]=250; // temperature value of 25,0
m.a[4]=01; // heater status OFF
m.a[8]=240; // temperature value of 24,0
m.a[12]=00; // heater status ON
m.a[16]=220; // temperature value of 22,0
m.a[20]=00; // heater status ON
read(&m
HTML:
}
void read(struct memory m)
{
int i;
for(i=0;i<sizeof(msize);i++)
{
scanf("%d", m.a);
}
}
the code is showing error in void read function as first defined here .
Please some one also help me to convert this read value to ASCII ??