vector

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rsforster@sympatico.ca

    vector


    I was wondering why Visual Studio is not recognizing my vector
    declarations properly.

    I enter the following code :

    #include <vector>

    ....


    class whatever {

    ....

    vector<aule_gl_ window ** windows;

    ....

    }


    and it sometimes gives me an error like :

    Missing semicolon after 'vector'

    It does not seem to recognize anything after the identifier "vevtor"


    Robin

  • mlimber

    #2
    Re: vector


    rsforster@sympa tico.ca wrote:
    I was wondering why Visual Studio is not recognizing my vector
    declarations properly.
    >
    I enter the following code :
    >
    #include <vector>
    >
    ...
    >
    >
    class whatever {
    >
    ...
    >
    vector<aule_gl_ window ** windows;
    Try std::vector. Are you sure you want a pointer to a vector?
    >
    ...
    >
    }
    >
    >
    and it sometimes gives me an error like :
    >
    Missing semicolon after 'vector'
    >
    It does not seem to recognize anything after the identifier "vevtor"
    >
    >
    Robin
    Cheers! --M

    Comment

    • rsforster@sympatico.ca

      #3
      Re: vector


      mlimber wrote:
      >
      Try std::vector. Are you sure you want a pointer to a vector?
      >
      I tried that and it does not work.

      As for the pointer, this was my first big C++ project and there are a
      few faux pas like this in my code.

      Comment

      • rossum

        #4
        Re: vector

        On 9 Aug 2006 12:45:09 -0700, "rsforster@symp atico.ca"
        <rsforster@symp atico.cawrote:
        >
        >I was wondering why Visual Studio is not recognizing my vector
        >declarations properly.
        >
        >I enter the following code :
        >
        >#include <vector>
        >
        >...
        >
        >
        >class whatever {
        >
        >...
        >
        vector<aule_gl_ window ** windows;
        >
        >...
        >
        >}
        >
        >
        >and it sometimes gives me an error like :
        >
        >Missing semicolon after 'vector'
        >
        >It does not seem to recognize anything after the identifier "vevtor"
        >
        >
        >Robin
        Have you tried changing the name of your variable "windows" which
        might be doing something strange to the MS compiler?

        Failing that, can you get
        std::vector<int intVec; to compile?

        how about
        std::vector<int *intPvec; ?

        rossum


        Comment

        • Thomas J. Gritzan

          #5
          Re: vector

          rsforster@sympa tico.ca schrieb:
          mlimber wrote:
          >Try std::vector. Are you sure you want a pointer to a vector?
          >>
          >
          I tried that and it does not work.
          Write a small example that shows the error and past the code here.

          --
          Thomas

          Comment

          • rsforster@sympatico.ca

            #6
            Re: vector


            Have you tried changing the name of your variable "windows" which
            might be doing something strange to the MS compiler?
            >
            Failing that, can you get
            std::vector<int intVec; to compile?
            >
            how about
            std::vector<int *intPvec; ?
            >
            rossum
            I'll give it a shot.

            Comment

            Working...