473,385 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB 2003 defining word, unions and typedef

Is there any way in VB 2003 to define the following code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. /* Global Type Definitions */
  3. typedef    unsigned char     byte;          // 'byte' is an 8-bit unsigned value
  4. typedef    unsigned int        word;         // 'word' is a 16-bit unsigned value
  5.  
  6.  
  7. /* Global Structure Definitions */
  8. struct byte_low_hi {
  9.  byte low_byte;
  10.  byte high_byte;
  11. };
  12.  
  13. /* Global Union Definitions */
  14. union word_byte {
  15.  word                            word16;
  16.  struct    byte_low_hi     byte8;
  17. };
  18.  
  19.  
Sep 9 '07 #1
1 984
debasisdas
8,127 Expert 4TB
Question moved to .NET Forum.
Nov 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Tim Cambrant | last post by:
Hi. I was reading up a bit on the features of C I seldom use, and I came across unions. I understand the concept, and that all the contained variables etc. share the same memory. Thus, when a new...
9
by: Neil Zanella | last post by:
Hello, Some programmers like to use a coding convention where all names of variables that are pointers start with the letter p (and sometimes even use similar conventions for strings and other...
10
by: Koen | last post by:
Hi! Does anyone know what the standard says about the way unions are stored in C? I mean the following: Let's say you have a union with a double and a char field: union MyUnion_t { double...
3
by: Fritz | last post by:
Is is possible to create a C style union in C Sharp? I'm trying to call functions in an unmanaged DLL that has a struct with unions in it as a function parameter. I've looked at the "StructLayout"...
1
by: qwerty2_reverse_iterator | last post by:
Is this a bug with the ms compiler (V7.1)? (It seems so at least.) I get errors when I don't initialize all the const pointer fields of an anonymous union in a struct. Example: //T2.h...
10
by: nambissan.nisha | last post by:
I am facing this problem.... I have to define a structure at runtime as the user specifies... The user will tell the number of fields,the actual fields...(maybe basic or array types or...
4
by: Mike | last post by:
Hi ! I have some strange problem and I would like to know if it is a bug or not : In my projects, in 2 different .cpp files, I use the same name to define a local structure: file1.cpp : ...
12
by: cmdolcet69 | last post by:
Can anyone give me some ideas on how to convert the following program to vb 2003? I would like to jsut take this code and implement it in vb. def.h /* Global Type Definitions */ typedef ...
11
by: pereges | last post by:
Hello, can some one please guide me a little into using unions. I read about unions in K & R but I am finding it difficult to apply to my problem at hand. I want to save up some space by using...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.