Does Vector is not supported by VC++ 6.0??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Groys

    #31
    Re: Does Vector is not supported by VC++ 6.0??



    Mike Wahler wrote:[color=blue]
    > "Michael Groys" <michaelg@alzt. tau.ac.il> wrote in message
    > news:c05moo$oau $1@news.iucc.ac .il...
    >[color=green][color=darkred]
    >>>vector<vecto r<int> > obj;
    >>>
    >>>is the normal way to solve the problem. I couldn't imagine anyone would
    >>>write a compiler in which this does not work. Anyhow, you claim that
    >>>VC++ 6 does not support the insertion of a space but a quick google
    >>>search suggests it does.
    >>>
    >>>Mike[/color]
    >>
    >>I didn't do any search in Google concerning this problem, but I did
    >>write programs in VC6 and I got an error.[/color]
    >
    >
    > OK post the *exact* code you tried, and the exact text of any error
    > messages.
    >
    > -Mike
    >
    >[/color]

    Ok, SP 4 indeed fixed this problem, but in initial Version of VC 6

    the following code, didn't work

    class MyClass: public MyClassT<vector <int> >
    {
    public:
    // with any number of spaces on the next line.
    MyClass(int i): MyClassT<vector <int> > (i)
    {...}
    };

    And this has nothing to do with standard.

    Don't worry be happy, Michael

    Comment

    • Mike Wahler

      #32
      Re: Does Vector is not supported by VC++ 6.0??

      "Michael Groys" <michaelg@alzt. tau.ac.il> wrote in message
      news:c07kso$45l $1@news.iucc.ac .il...[color=blue]
      >
      >
      > Mike Wahler wrote:[color=green]
      > > "Michael Groys" <michaelg@alzt. tau.ac.il> wrote in message
      > > news:c05moo$oau $1@news.iucc.ac .il...
      > >[color=darkred]
      > >>>vector<vecto r<int> > obj;
      > >>>
      > >>>is the normal way to solve the problem. I couldn't imagine anyone would
      > >>>write a compiler in which this does not work. Anyhow, you claim that
      > >>>VC++ 6 does not support the insertion of a space but a quick google
      > >>>search suggests it does.
      > >>>
      > >>>Mike
      > >>
      > >>I didn't do any search in Google concerning this problem, but I did
      > >>write programs in VC6 and I got an error.[/color]
      > >
      > >
      > > OK post the *exact* code you tried, and the exact text of any error
      > > messages.
      > >
      > > -Mike
      > >
      > >[/color]
      >
      > Ok, SP 4 indeed fixed this problem, but in initial Version of VC 6[/color]

      Note that the latest patch for VC6 is SP5
      [color=blue]
      >
      > the following code, didn't work
      >
      > class MyClass: public MyClassT<vector <int> >
      > {
      > public:
      > // with any number of spaces on the next line.
      > MyClass(int i): MyClassT<vector <int> > (i)
      > {...}
      > };
      >
      > And this has nothing to do with standard.[/color]

      Your problem had to do with a broken compiler.

      But we do use the standard to determine code correctness.
      We obviously can't use a compiler, because, as you've seen,
      sometimes they're broken. (Look up "quality of implementation" ).

      -Mike


      Comment

      • Michael Groys

        #33
        Re: Does Vector is not supported by VC++ 6.0??



        Mike Wahler wrote:[color=blue]
        >
        > Your problem had to do with a broken compiler.
        >
        > But we do use the standard to determine code correctness.
        > We obviously can't use a compiler, because, as you've seen,
        > sometimes they're broken. (Look up "quality of implementation" ).
        >
        > -Mike
        >
        >[/color]
        You are right, but I was talking about concrete problem that was in VC 6
        and not about the standard.
        Thats all.

        BTW does somebody knows how to determine what SP of VC is installed.
        In Help->About this information doesn't appear.
        Michael

        Comment

        • Carl Muller

          #34
          Re: Does Vector is not supported by VC++ 6.0??

          ram_laxman@indi a.com (Ram Laxman) wrote in message news:<24812e22. 0402080308.6024 a6d2@posting.go ogle.com>...[color=blue]
          > I have used vector in the VC++ compiler. I have included
          >
          > #include <string>
          > #include <algorithm>
          > #include <vector>
          >
          > std::vector<int > field;
          > std::vector <int>::size_typ e i;
          >
          >
          > test.cpp(135) : error C2653: 'std' : is not a class or namespace name
          > error C2143: syntax error : missing ';' before '<'
          > error C2501: 'vector' : missing storage-class or type specifiers
          > error C2143: syntax error : missing ';' before '<'
          > error C2653: 'std' : is not a class or namespace name
          >
          >
          > Does anybody know what is the problem??
          >
          > Regards
          > Bubunia[/color]

          Most likely you have an error in one of the header files or
          declarations you are including before line 135 that you have omitted,
          for example defining a class or an enum without putting a semicolon
          after it.

          Comment

          • Mike Wahler

            #35
            Re: [OT, redirect] Does Vector is not supported by VC++ 6.0??


            "Michael Groys" <michaelg@alzt. tau.ac.il> wrote in message
            news:c07nrm$6bn $1@news.iucc.ac .il...[color=blue]
            >
            >
            > Mike Wahler wrote:[color=green]
            > >
            > > Your problem had to do with a broken compiler.
            > >
            > > But we do use the standard to determine code correctness.
            > > We obviously can't use a compiler, because, as you've seen,
            > > sometimes they're broken. (Look up "quality of implementation" ).
            > >
            > > -Mike
            > >
            > >[/color]
            > You are right, but I was talking about concrete problem that was in VC 6
            > and not about the standard.
            > Thats all.[/color]

            Right, you were dealing with a compiler problem, not a language issue.
            Of course, it took asking here to determine that (iow you needed to
            know if the compiler was implementing the language correctly). But
            once that has been determined (compiler problem), that makes your issue
            off-topic here.
            [color=blue]
            >
            > BTW does somebody knows how to determine what SP of VC is installed.
            > In Help->About this information doesn't appear.[/color]

            You're asking another OFF TOPIC question. We discuss ONLY the (ISO)
            standard) language here.

            Ask about Visual C++ in Visual C++ newsgroups. You can find them
            by visiting www.msdn.microsoft.com/newsgroups

            -Mike


            Comment

            • Andy Buchanan

              #36
              Re: Does Vector is not supported by VC++ 6.0??

              On Sun, 08 Feb 2004 18:05:35 +0200, Michael Groys
              <michaelg@alzt. tau.ac.il> wrote:[color=blue]
              >Michael Mellor wrote:[color=green]
              >> Michael Groys wrote:
              >>[color=darkred]
              >>> David Harmon wrote:
              >>>
              >>>> On Sun, 08 Feb 2004 16:43:06 +0200 in comp.lang.c++, Michael Groys
              >>>> <michaelg@alzt. tau.ac.il> was alleged to have written:
              >>>>
              >>>>> vector<vector<i nt>> will not work for sure because of
              >>>>> ^^
              >>>>> and the only solution is to write
              >>>>> vector<vector<i nt>/**/>
              >>>>
              >>>>
              >>>> Wrong, no space-filling comment required. Standard solution is
              >>>> vector<vector<i nt> >
              >>>>
              >>>> Naturally, operator>> will not work there.
              >>>
              >>>
              >>> Just inserting one space doesn't help.
              >>> Try it if you don't believe.[/color]
              >>
              >>
              >> Firstly, I assume your entire discussion is about VC++ 6.
              >>
              >> vector<vector<i nt> > obj;
              >>
              >> is the normal way to solve the problem. I couldn't imagine anyone would
              >> write a compiler in which this does not work. Anyhow, you claim that
              >> VC++ 6 does not support the insertion of a space but a quick google
              >> search suggests it does.
              >>
              >> Mike[/color]
              >I didn't do any search in Google concerning this problem, but I did
              >write programs in VC6 and I got an error.
              >Did you try it in VC or just in google?[/color]

              From a recent vc++6 project of mine.

              std::vector< std::vector<Bea tErrorData> > m_SubbandBPMSco res;

              No Error. Maybe you need a service pack or 3?

              R.
              Andy

              Comment

              Working...