Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Leadorn

  • Rank
    Advanced Member
  1. Leadorn

    Hundreds of options

    Boost program options can be used to read options from command line and file. Very easy to use.
  2. Leadorn

    memory management

    I would guess only the operating system can do efficient/realistic memory defragmentation. Because I think you do memory defragmentation by moving the memory pages around underneath the applications memory space (virtual memory).
  3. Leadorn

    You first programming job

    I decided to send an email to a company in Lund Sweden, got an interview, did the interview, got the job.
  4. Hello again Thanks for the reply. The garbage collector is working as supposed but I still have a problem. I have a FlowLayoutPanel which I add controls to. At some other time in the program I want to remove all controls which I use Controls->Clear() for. The problem is that the controls aren’t collected by the garbage collector as they are supposed to. I’ve done some testing. In the first test (in the constructor) I add 100 controls and then I call Controls->Clear, the garbage collector is collecting dead controls as it should. Everything is fine. But if I add and clear the controls in a menu click event function it doesn’t work at all. The Controls disappear but they are not collected by the GC.
  5. Hello I am having some problem with objects not collected by the garbage collector in c++. My application crash when USER HANDLES reach 10 000 which is because the gc arent freeing my garbage. I've tried calling System::GC::Collect(); but nothing happends. Questions How does GC know my root objects? Why isent my destructor called in this code example? // gctest.cpp : main project file. #include "stdafx.h" using namespace System; public ref class gctest { public: gctest(); ~gctest(); }; gctest::gctest() { int a = 1+1; } gctest::~gctest() { int a = 1+1; } int main(array<System::String ^> ^args) { gctest ^g = gcnew gctest; g = nullptr; System::GC::Collect(); return 0; } Is there some switch i have to add in the compiler? Im guessing i should set a gc ref variable to nullptr or to a new object for the gc to collect the old object?
  6. Thank u so much! I give u a gold star :D
  7. Hej How do i make a reference to another object. For example i want a function that take a string as input and adds texts to the string, which then can be used outside the function. (I want pointers or regerence) String ^text = gcnew String("asd"); //"asd" f00(text); //"asdsnake" void f00(String ^str) { str+= "snake"; }
  8. Leadorn

    ascii to ISO 8859-1

    nice: iconv -f CP437 -t ISO-8859-1 D061115.txt > asd.txt And there is a libiconv too.
  9. Leadorn

    ascii to ISO 8859-1

    Quote:Original post by nmi In linux there is a tool called 'iconv', which allows to convert between various character sets. Maybe you give it a try ? Thanks for all help especially this help.
  10. Leadorn

    ascii to ISO 8859-1

    I have done some more reading and I found out that the file is probably in Code Page 437. "IBM PC or MS-DOS code page 437, often abbreviated CP437 and also known as DOS-US, OEM-US or even just the OEM font [1], is the original character set of the IBM PC, circa 1981. The following is a table representing CP437 using the equivalent Unicode characters:" The extended above 127 needs to be converted example: swedish 'å' dec CP437 134 needs to be converted to 229 (Latin 1). So the problem is: I need to convert from CP437 to Latin 1 (ISO 8859-1).
  11. Leadorn

    ascii to ISO 8859-1
  12. Leadorn

    ascii to ISO 8859-1

    If no conversion is needed I wouldn’t have posted here in the first place. There are differences between the two character sets.
  13. Hi I have a text file in ASCII code base and I want to convert this file to Latin 1 ISO 8859-1. How is this done? Can it be done platform independent? Are there any libraries available for this? the file come in this format whatever that is: and i want it in:
  14. Hi I have a problem when serializing a vector to xml with boost serialization. There is functionality in the boost serialization library to serialize containers but I can’t get it to disable tracking_level. One can use this macro for classes but I can’t figure out how to use it to disable class tracking in std::vector. BOOST_CLASS_TRACKING(MyClass, boost::serialization::track_never);
  15. Quote:Original post by CTar Quote:lol snk_kid gave you some very good advice, no need to laugh at that. You on the other hand made a post stating wrong things as if they were facts, and never told what your problem was. Don't your code compile, run-time error, odd behavior? Ye right he is just another wise guy. None of the things he wrote will help me. I’m just so tired of ppl that just have to write and point out that everything, which for that matter doesn’t change the problem, is wrong. The problem still exist.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!