| | |
About LPSTR
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2008
Posts: 1,495
Reputation:
Solved Threads: 123
Yes, windows tend to do that for alot of types, and sometimes theres no need for them, for example in one of the header files I found these:
and hunderds more..
CPP Syntax (Toggle Plain Text)
#define CONST const typedef int INT; typedef float FLOAT;
I need pageviews! most fun profile ever :)
•
•
•
•
Yes, windows tend to do that for alot of types, and sometimes theres no need for them, for example in one of the header files I found these:
and hunderds more..CPP Syntax (Toggle Plain Text)
#define CONST const typedef int INT; typedef float FLOAT;
c++ Syntax (Toggle Plain Text)
typedef void VOID
=P
I'm pretty sure that exists too.
I also love this one (not sure if its in Windows API or DirectX):
It's just a way to make types sort of case-insensitive. It may be a bit superfluous at times, but it's a neat thing to have.
I also love this one (not sure if its in Windows API or DirectX):
C++ Syntax (Toggle Plain Text)
#define 1 TRUE #define 0 FALSE typedef int BOOL;
It's just a way to make types sort of case-insensitive. It may be a bit superfluous at times, but it's a neat thing to have.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
•
•
Join Date: Nov 2007
Posts: 980
Reputation:
Solved Threads: 210
•
•
•
•
I'm pretty sure that exists too.
I also love this one (not sure if its in Windows API or DirectX):
C++ Syntax (Toggle Plain Text)
#define 1 TRUE #define 0 FALSE
C++ Syntax (Toggle Plain Text)
#define TRUE 1 #define FALSE 0
•
•
Join Date: Mar 2008
Posts: 1,495
Reputation:
Solved Threads: 123
the BOOL typedef'd as an int isn't actually so bad, it allows you to set your own returns values like:
any many more... 
and can be more understood when returned as BOOL instead of int.
CPP Syntax (Toggle Plain Text)
#define FALSE 0 #define TRUE 1 #define OVERFLOW 2 #define FAIL 3 #define SUCCESS 4

and can be more understood when returned as BOOL instead of int.
I need pageviews! most fun profile ever :)
These typedefs and macros were created by MS team in early Windows era in the interests of portability.
See brief summary and historical introduction:
http://en.wikibooks.org/wiki/Windows...and_Data_Types
See brief summary and historical introduction:
http://en.wikibooks.org/wiki/Windows...and_Data_Types
Oh ya. Got confused with the typedefs.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
![]() |
Similar Threads
- Convert std::string to LPSTR or LPCSTR (C++)
- conversion to binary image (C++)
- Windows Main and Command Line Parameters (C)
- graphic.h (Game Development)
- MS Visual++ 6.0 - Error C2146, C2501 ... (C++)
- Displaying a different bitmap in different child windows? - win32 in C (C)
- Need help with DirectX code (C)
- Error Linking KeyLogger.exe (C++)
Other Threads in the C++ Forum
- Previous Thread: getting character input with one keystroke
- Next Thread: graphics in c++
Views: 5815 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project python random read recursion recursive reference return sort stream string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






