Grey Wolf boxes

After reading the forums here, I saw Grey Wolf use boxes to represent memory with strings, and I thought it was pretty effective. It got my attention, anyway. So I wrote a class that does something similar. Here's sample code and output.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "boxer.h"

int main(void)
{
  boxer info = boxer("Class draws boxes");
  info.box();
  boxer demo = boxer("With special effects...", db, true);
  demo.box();
  boxer spchars = boxer("And special \t\r\b\\0\n characters", ul, false);
  spchars.box();
  return 0;
}
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│C│l│a│s│s│ │d│r│a│w│s│ │b│o│x│e│s│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
╔═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╗
║W│i│t│h│ │s│p│e│c│i│a│l│ │e│f│f│e│c│t│s│.│.│.║█
╚═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╝█
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬──┬──┬──┬──┬──┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│A│n│d│ │s│p│e│c│i│a│l│ │\t│\r│\b│\0│\n│ │c│h│a│r│a│c│t│e│r│s│
╘═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧══╧══╧══╧══╧══╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╛


The class header and implementation files are attached to the thread posted below, free to use, modify, whatever. It's my first attempt at writing a class, so it's not bulletproof.

http://www.cppbeginners.com/showpost.php?p=74&postcount=1

-Drew
You don't seem to have the pointers.
Probably not, but can you elaborate?
Topic archived. No new replies allowed.