Jump to content
Sign in to follow this  
sdujolo

Typedef Struct

Recommended Posts

I have a function that returning struct below. The vaiable that is first in the struct is not correct. When I but the dummy variable that not is used it´s okay. Is it a bugg?

 

Thanks

 

typedef struct temp_data {

char chr_temp; //Value is always 0

char negative;

char chr_decimal;

int temp;

int decimal;

} oo_temp;

 

typedef struct temp_data {

char dummy; //just a dummy variable that is not used

char chr_temp; //Working is have the dummy variable before

char negative;

char chr_decimal;

int temp;

int decimal;

} oo_temp;

Share this post


Link to post
Share on other sites

sdujolo,

I have a function that returning struct below. The vaiable that is first in the struct is not correct. When I but the dummy variable that not is used it´s okay. Is it a bugg?

 

Sounds like one :(

Can you supply a small program that demonstrates the problem, it will make its easier for us to find the issue.

 

Regards

Dave

Share this post


Link to post
Share on other sites
sdujolo,
I have a function that returning struct below. The vaiable that is first in the struct is not correct. When I but the dummy variable that not is used it´s okay. Is it a bugg?

 

Sounds like one :(

Can you supply a small program that demonstrates the problem, it will make its easier for us to find the issue.

 

Regards

Dave

 

Can I mail you the project becasue it look like it works when I use it in a small test project?

 

Regards /Jörgen

Edited by sdujolo

Share this post


Link to post
Share on other sites

Jörgen,

 

Can I mail you the project becasue it look like it works when I use it in a small test project?
Yes, please send it to support@sourceboost.com

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...