if you want to scan an ascii you have to use char
#include<conio.h>
float Purchase, TaxRate;
char County;
Type: Posts; User: raadys
if you want to scan an ascii you have to use char
#include<conio.h>
float Purchase, TaxRate;
char County;
#include <stdio.h>
float Purchase, TaxRate;
int County;
int main()
{
printf("AMOUNT OF PURCHASE? ");
scanf("%f", &Purchase);
printf("COUNTY? ");
scanf("%i", &County);
if(County == 65)
thank u !
Even I have updated to a union, i am able to access the member send data as hexa value. but not as a bit values.
#include<stdio.h>
typedef unsigned char byte;
typedef union _Range
{
byte...
Hi,
I am using a struct and tying to send values to it as byte value
#include<stdio.h>
typedef struct{
You are saying this
....[↓ ]
[...|0 1 2 3|0 1 2 3|...]
[...|int..... |int..... |...]
Which makes more sense when I increment that pointer? This:
................[↓ ]
[...|0 1 2...
char *ptr;
printf("Output: %d %d %d\n",sizeof(ptr), ptr, ptr+1);
Output: 4 214734480 214734481
int *ptr;
printf("Output: %d %d %d\n",sizeof(ptr), ptr, ptr+1);
Output: 4 214734480...
I am using a structure , and when i am assing values i get the warning message , how do I avoid that ?
// header file
typedef struct {
unsigned _T_ipset:1;
unsigned...
I have computed it my self.
#include<stdio.h>
typedef union _Time
{
Hi,
I am bit confused in passing the structure to a function.
I made a small code and it doesn't build !
#include<stdio.h>
struct Compute_off_Time(struct WHATTIME);
I will use these in functions for writing them to EEPROM which based on arrays.
what else should be added or removed for the written code so far, for eradicating the warning messages w.r.t 'C'...
Hi,
I get a warning messages
how to eradicate ?
I type casted strcat(Compile_Date,Compile_Time) to
strcat((unsigned char*)Compile_Date,(unsigned char *)Compile_Time)
but I see now change.
I am trying to enter data to a structure some 8 times, but not able to do so. Here is my code.
#include<stdio.h>
struct _Timer {
unsigned int HH;
unsigned int MM;
}Time[8];
Link Error: Cannot access symbol (_Yaxis) at an odd address
still presists even after changing according to your solutions
I want to update three variables using a single macro.
I have tried a code using some examples
#define ShowScreen(x,y,z) {xaxis=x,yaxis=y,zaxis=z;}
main()
{
int...
then how can I print time from system at regular intervals ?
Hi ,
Its a code in module of my program, where I need to print current time (HH:MM:SS) at regular intervals. I excluded other code for understanding.
#include<time.h>
#include<stdio.h>...
Barney, thanks for your reply.
Did you mean for example if I need to compare the structure or use in any loop cases , initialization should be mandatory for dummy variable ?
Hi,
Let me say I have a structure
struct time{
char hours;
char minutes;
char seconds;
char dummy;
Hi,
Let me say I have a structure
struct time{
char hours;
char minutes;
char seconds;
char dummy;