Advertisement

bitmap fonts onto bitmaps

Started by October 01, 2003 07:02 AM
15 comments, last by trager 21 years, 4 months ago
They are called "templates". kind of like classes I guess you could say.

"vector" is basically an adjustable array. The STL documentation say stuff like its quick at adding and removing items from array. So this is just like moving blocks of memory around.

another part of the STL is one called "list"
"list" is more like a linked list, as its all ready to be sorted (btw - there is also different types of sort using "sort" inside of stl aswell) very quickly, and also rearranged etc.

There are lots of things in it. If you''re planning on sticking with C++, and think you will do any form of data manipulation, processing or handling (btw - that''s what I mainly do) and would prefer to keep your code relatively neat and simple, look into the various templates in STL. (odd''s are you will do alot of data work anyway in my opinion).

That''s my opinion anyway.

Beer - the love catalystgood ol' homepage
That''s interesting.

It never works for me as:
#include <vectors.h>


I''ve always had to define the STL Vector by:
#include <vector>


Learn about game programming!Games Programming in C++: Start to Finish
Advertisement
The correct way to include vector is:
#include <vector>

For all c/c++ standard library headers you leave off the ''.h''.

Enigma
The reason why I still use <vector.h> is because along time ago...

quote:

Release 3.0: October 31, 1997
Major reorganization of header files. Headers now have the names described in the draft C++ standard. (Old header names are provided as well for backward compatibility.) The new-style headers declare their contents in namespace std; the old-style headers do too, but they import those declarations into the global namespace with using declarations. So, for example, #include <vector.h> is roughly equivalent to #include <vector> followed by the declaration using std::vector;.
Note that namespace std is only enabled for compilers whose support for namespaces is sufficient; this is controlled by the header .
Bug fixes, and minor changes for standard conformance.



SGI's page here
http://www.sgi.com/tech/stl/whats_new.html

[edited by - Dredge-Master on October 20, 2003 8:21:47 PM]
Beer - the love catalystgood ol' homepage
I wish I could just do...

#include <iostream.h>

cout << "Blah Blah Blah";

for my text =P
me too,

I eventually sorted it using SDL, FreeType and a SDL FreeFont library and still I''ve had to write a few functions to simplify things.

got it down to text(surface*, x, y, "Hello World"; now
Advertisement
quote:
Original post by Anonymous Poster
me too,

I eventually sorted it using SDL, FreeType and a SDL FreeFont library and still I''ve had to write a few functions to simplify things.

got it down to text(surface*, x, y, "Hello World"); now


similar to what I did too. libpng/wglbitmap loading then using
my own glpngtext(x,y,z,valign,halign,vscale,hscale,spacing,string); function to stick it on the screen. (and macros for predefined positions).

Personally I use printf more frequently as opposed to cout


I still use ''s sprintf more than the win32 AnsiString.sprintf versions.
Beer - the love catalystgood ol' homepage

This topic is closed to new replies.

Advertisement