|
-
Feb 22nd, 2003, 10:17 AM
#1
Thread Starter
Hyperactive Member
Just Need A Simple Explanation
I'm converting some C++ code to VB.
I don't understand how part of this declaration works:
#ifndef IGBOOL
#ifdef __WIN32
typedef int IGBOOL;
#else
typedef long IGBOOL;
#endif
#endif
struct NotifyCallbackRecord{
IGBOOL Message; /* The message ID for the notification */
IGBOOL DataStatus; /* The status of the data attached to the notification */
char Data; /* The address of the data attached to the notification */
};
The type IGBOOL is defined as an INT.
I understand that an INT in C++ equals a LONG in VB.
But how can a CHAR be an address?
Isn't a CHAR a single byte?
I need to convert this to VB.
Anyone? Anyone?
-
Feb 22nd, 2003, 05:10 PM
#2
yay gay
CHAR is a CHAR but a CHAR* is a pointer to a CHAR that can be a CHAR array pointer that is poiting to the first member of the array.
this can sound confusing....but it isn't lol
\m/  \m/
-
Feb 22nd, 2003, 05:18 PM
#3
Thread Starter
Hyperactive Member
So, if a CHAR is just a sinlge byte char, then how could it be used as way of passing/pointing to an address?
More importantly, if I'm trying to re-write this in VB, how would it be done?
-
Feb 22nd, 2003, 05:44 PM
#4
transcendental analytic
char* would be a pointer, but obviously its char here 
otherways you could have an array of bytes
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Feb 22nd, 2003, 05:50 PM
#5
Thread Starter
Hyperactive Member
So how does that help me?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|