E
Eric A. Johnson
Hi,
I am working on a way to create a "window" within a dos console. I'm
using Microsoft Visual C++. My main problem is that I am using new to
create a new CHAR_INFO array within the constructor, and I want to destroy
it within the destructor using delete. However, the array is not known
outside of the constructor. This is a class within a class. Until the
object is created, it has no way to know the size of the array; the size is
passed as a parameter to the constructor. Is there a way to make the
destructor aware of the array, or to make it public to the class from within
the constructor? I am using it to store the original information of the
screen that will be overwritten, so that when the window is finished, it can
rewrite the original information (including the background and foreground
color) before the "window" is completely destroyed.
On a side note, has anybody else written advanced console applications? How
did you handle "windows"? If I can get this to work properly, I plan to,
eventually, use it to create menus and so on within the console.
Thanks in Advance,
Eric
I am working on a way to create a "window" within a dos console. I'm
using Microsoft Visual C++. My main problem is that I am using new to
create a new CHAR_INFO array within the constructor, and I want to destroy
it within the destructor using delete. However, the array is not known
outside of the constructor. This is a class within a class. Until the
object is created, it has no way to know the size of the array; the size is
passed as a parameter to the constructor. Is there a way to make the
destructor aware of the array, or to make it public to the class from within
the constructor? I am using it to store the original information of the
screen that will be overwritten, so that when the window is finished, it can
rewrite the original information (including the background and foreground
color) before the "window" is completely destroyed.
On a side note, has anybody else written advanced console applications? How
did you handle "windows"? If I can get this to work properly, I plan to,
eventually, use it to create menus and so on within the console.
Thanks in Advance,
Eric