From: Giovanni Dicanio on
"RB" <NoMail(a)NoSpam> ha scritto nel messaggio
news:#xDVSDj7KHA.356(a)TK2MSFTNGP05.phx.gbl...

> 1. Where can I get examples of this STLport ?

http://www.stlport.org/

But I believe that VC6's STL implementation is OK with basic std::vector
features.
I recall that I used std::vector in some VC6 projects without STLport, and
there seemed to be no bugs.

Some patches for VC6's STL implementation can be found here as well:

http://www.dinkumware.com/vc_fixes.html


> 2. Can I install VS 2005 on the same machine without uninstalling my VC 6
> ?

Yes.
You may also want to try VS2010 Express (free download).


Giovanni


From: RB on

Thanks Giovanni you've been a great help.
These two links are better than any I found so far.
I will decide which way I am going to fix this or just give
up on this particular project and keep doing it long hand
with a calculator. I cannot seem to get to base one before
running into a block on this project.


From: Giovanni Dicanio on
"RB" <NoMail(a)NoSpam> ha scritto nel messaggio
news:ePAABYr7KHA.2292(a)TK2MSFTNGP04.phx.gbl...

> Thanks Giovanni you've been a great help.

You're welcome.


> These two links are better than any I found so far.

I'm glad you find them useful.


> I will decide which way I am going to fix this or just give
> up on this particular project and keep doing it long hand
> with a calculator. I cannot seem to get to base one before
> running into a block on this project.

Did you try the sample vector code snippet with VC6?
That code does not use fancy template metaprogramming techniques, so it
should compile and run fine on VC6, too...
(And if you experience some problems, you may try STLport or Dinkumware
patches.)
However, in the long-run, moving to a more modern version of the compiler is
a wise and good investement.

Giovanni



<code>

#include <vector>
#include <iostream>

using namespace std;

int main()
{
size_t size = 10;
vector<int> array(size);

for (size_t i = 0; i < size; i++) {
array[i] = i;
}

for (size_t j = 0; j < size; j++) {
cout << array[j] << endl;
}

return 0;
}

</code>


From: RB on
> Did you try the sample vector code snippet with VC6?

Yes I did and it had errors too, so was about to give it up.
I did not think there was anything wrong with my previous
code since the apps compiled with no errors and no warnings
before putting in the vector samples.
But out of desperation I created a totally new project and
made it the same base creation as the one I was having trouble
with. I put the
#include <vector>
#include <iostream>
using namespace std;
outside the ViewClass implementation but still in the cpp file just
like I had it in the other app but this time it compiled with no
errors. I don't understand why the previous app compiled ok
until I paste in the same code the same way and then it did not.
I may go back in and comment out everything I added and start
with the vector first and then add till I find it.


From: Joseph M. Newcomer on
Generally, there is no such thing as "did not compile" as a bug report. There is ALWAYS a
specific error message associated with a particular line in the file. Without presenting
that error message and the corresponding source code with the line number identified,
there is no way to guess what is going on.
joe

On Sat, 8 May 2010 19:21:43 -0400, "RB" <NoMail(a)NoSpam> wrote:

>> Did you try the sample vector code snippet with VC6?
>
>Yes I did and it had errors too, so was about to give it up.
>I did not think there was anything wrong with my previous
>code since the apps compiled with no errors and no warnings
>before putting in the vector samples.
>But out of desperation I created a totally new project and
>made it the same base creation as the one I was having trouble
>with. I put the
>#include <vector>
>#include <iostream>
>using namespace std;
>outside the ViewClass implementation but still in the cpp file just
>like I had it in the other app but this time it compiled with no
>errors. I don't understand why the previous app compiled ok
>until I paste in the same code the same way and then it did not.
>I may go back in and comment out everything I added and start
>with the vector first and then add till I find it.
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm