AnsweredAssumed Answered

Union in C language problem

Question asked by mohamadi.parisa on Sep 11, 2016
Latest reply on Sep 12, 2016 by AvaTar
I have written a code like this:
#include <stdio.h>
#include <string.h>
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_usart.h"
#include "stm32f10x_dma.h"
union receive{
    unsigned long int Pack;
    union receive var1;
void check(char data1,char data2){
    unsigned long int buffer[17];

but it returns 1 instead of 123456 or when I fill it with 654321 value it returns again 1.
what is my mistake?