Question on DLL ...... - page 7

[Deleted]  

http://www.cyberforum.ru/blogs/18334/blog97.html

Article on strings, well explains when strings are static (i.e. memory is not freed for them after leaving the declaration area).

[Deleted]  

Console in DLL.


#include <iostream>
#include <stdio.h>
if( AllocConsole() )                                    // Создаем консоль, у процесса не более одной.
{
   // Связываем буферы консоли с предопределенными файловыми описателями.
   freopen("conin$","r",stdin);
   freopen("conout$","w",stdout);
   freopen("conout$","w",stderr);
}
//std::cout<<"...";                                             // Пользуемся ))
//std::cin>> ;

FreeConsole();                                                  // Удаляем.
 
drknn:

No you can't - the library operates in a different area of RAM.

What area?

drknn:
If you decided to do programming, you need to be aware of the scope and lifetime of variables and functions. If you knew what's involved, you wouldn't even have these questions. This is the ABC of programming.

And where does one learn about the lifetime of variables and functions?