Hello All,

Newbie C/C++ programmer (veteran VB) here with a problem I cannot get past:

I am attempting to run/modify code created in Borland C++ v.6. When I try to run the code in the IDE I consistently get an EAccessViolaton with the line of code in the title highlighted. It is in _ios.c and is part of the following code block:

template <class _CharT, class _Traits>
basic_ios<_CharT, _Traits>::basic_ios()
: ios_base(),
_M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0)
{}

I am running Windows7 (but I also get the error on WinXP machines) and I would really appreciate help understanding what is going on and how to fix it.


Thanks,
Mark

It sounds like you're trying to update some old code. What IDE are you currently using? Are you actually using Borland C++ v6 as your IDE or are you using something else?

Edited 6 Years Ago by Fbody: n/a

I *am* actually using Borland C++ v6. I work for a non-profit and money is something they don't let me play with yet. And the code is quite old - I'm sure some of it had its beginning in the '80s or earlier.

Thanks in advance for any help you can give.

Mark

A couple things.

You are trying to use an older compiler on a VERY modern system. There is probably an incompatibility there. Depending on the contents and design of your existing code, I think it might be advisable for you to download a more modern free C++ compiler, such as MS-VC++ 2010 Express, for compatibility. VC++ Express should feel fairly "natural" to you considering your familiarity with VB. There will probably have to be some code updates since you are porting from Borland to VC++.

Also, ios_base is a class that all of your I/O streams inherit their properties from. If you are having a problem in the _ios.c file (which should have come with your compiler) you are probably not creating the stream correctly. Either that or the compatibility issue is there again. The stream that the compiler is trying to create might not be compatible with such a modern O/S.

Edited 6 Years Ago by Fbody: n/a

I appreciate your input. I have suspected most of the things you mentioned. I think I will leave this one unanswered for a bit longer to see if anyone else can suggest a solution that doesn't involve rewriting the application.

Thanks.

You might not have to re-write it. All you need to do is download and install a new compiler then do a copy/paste. Then, from there you should be able to make a few changes based on any errors you get and be done with it. Obviously, the number of changes required depends on the code and the features it uses. It really doesn't matter what you do, you're going to have some of that anyway.

You might not have to re-write it. All you need to do is download and install a new compiler then do a copy/paste. Then, from there you should be able to make a few changes based on any errors you get and be done with it. Obviously, the number of changes required depends on the code and the features it uses. It really doesn't matter what you do, you're going to have some of that anyway.

Found a patch (update) that seems to work, for now.

There was never any doubt that I would have to rewrite all of our apps/utils. It has always been a question of time and priorities.

Thanks for your input.


Mark

This question has already been answered. Start a new discussion instead.