Home |
Last modified: 16-06-2020 |
"Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more." http://wtl.sourceforge.net/
http://www.codeproject.com/wtl/
http://www.codeguru.com/Cpp/COM-Tech/atl/
http://www.idevresource.com/com/library/articles/wtlarch.asp
(Notes taken from Ted Jensen's excellent A tutorial on pointers and arrays in C)
A pointer is a variable that contains the adress of another variable (either numeric or string, or a function) instead of a directly accessible value.
When declaring a pointer, you must include the type of the variable whose adresse this pointer will contain, so that the compiler knows how many bytes to read/write when it will access the value that this variable contains. To differentiate pointers from other variable types, a pointer is declared using an asterisk (*).
As an example, int *ptr
declares a pointer to an integer. That
is, ptr will hold the address of a variable of type integer. Since the compiler
was told that the variable whose address ptr holds is an integer, it knows that
it should read/write 4 bytes (the size of an integer is platform dependent,
but it's usually 4 bytes.)
Knowing the length of the actual value this variable uses also allows you to move back and forth through a multi-byte value such as a string using the ++ and -- quantifiers:
To initialize a pointer, you need to extract the address of a variable, using the & sign:
To access the value that the variable points to, you must dereference the pointer, that is, tell the compiler that you wish to go to the address that the pointer holds, and read/write the value that this memory cell holds. Here's an example:
Now, let's change the content of the variable by dereferencing ptr:
The name of an array is actually the address of the first element:
A string is actually an array of characters that ends with a NUL character, ie. ASCII 0, is a pointer to the first character, and when a string is passed to a function, the function will work on the actual string since it receives the address of the array instead of a copy made when calling the function:
Important: when using a char pointer to create a string, the string is read-only, ie. if you need to change the contents of the string, you should use char [] instead:
Since a string created with the "char *" format is immutable, you could add the "const" prefix to get a compile-time error in case you changed the contents of this string:
Note that it's OK to reuse the pointer to set it to a new string, though, since it's the memory space used to store the string itself that is immutable, not the pointer:
I read that GCC accepts the "-fwritable-strings" switch to allow a pointed string to be writable, but this is likely to be non-portable across compilers. A better alternative is to use malloc() and free() to allocate memory dynamically:
"Pacific C is a freeware C compiler for DOS. Included is the HI-TECH Professional Development environment, an IDE allowing you to edit source code and manage projects with ease."
http://www.cs.virginia.edu/~lcc-win32/
Djgpp is DJ Delorie's port of gcc to DOS, and generates 32 bit MSDOS executables that is Windows 95 long-filename-aware
Cygwin is a GNU Win32 compiler and tools with POSIX emulation.
MinGW ("Minimalist GNU Win32") is a cut-down version of the Cygwin compiler, without the POSIX compatibility layer.
As for IDEs:
"Ultimate++ consists of a set of cross-platform Windows/Linux libraries ("packages"), and an IDE. The current Windows distribution is coupled with GCC/mingw compiler suite to create complete development system."
"Pelles C for Windows is a complete development kit for Windows and Pocket PC. It contains among other things an optimizing C compiler, a linker, a resource compiler, a message compiler, a make utility and install builders for both Windows and Pocket PC. It also contains an integrated development environment (IDE) with project management, debugger, source code editor and resource editors for dialogs, menus, string tables, accelerator tables, bitmaps, icons, cursors, animated cursors, animation videos (AVI's without sound), versions and XP manifests. The compiler is based on LCC, and the install builder for Windows is based on NSIS. Both are heavily modified."
This free version of the Borland C/C++ compiler only includes the command-line tools, not the IDE.
What's the difference with Borland C++ compiler and Borland C++ Builder, if any? Looks like Borland C++ is the older line, that supported both Win16 and Win32, while Borland C++ Builder is the current, 32-bit-only compiler.
http://www.pitt.edu/~stephenp/misc/downloadTC.html
http://community.borland.com/article/0,1410,20841,00.html
OpenWatcom is the open-source version of the Watcom compiler
http://www.intel.com/software/products/compilers/cwin/
The Microsoft Visual C++ Toolkit 2003 is a free download, and includes the core tools developers need to compile and link C++-based applications for Windows and the .NET Common Language Runtime.
Note: The Visual C++ 5.0 optimizer is known to cause problems with many programs. Use the "Favor Small Code" optimization setting. The Visual C++ 6.0 optimizer seems to be much better and can be used with the "optimized for speed" setting.
You can also use the older, commercial release of VC++ 6 (The following table shows which features are in each edition (Standard, Professional, or Enterprise) of Visual C++ 6.0)
Free Visual C++ Command Line Tools
Go to the very end of the source file, and hit ENTER. It's probably because the last } doesn't have a carriage return character.