why does initialise with vector not work here ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthias Pospiech

    why does initialise with vector not work here ?

    This class:

    #pragma once
    #include <vector>
    #include "um.h"

    #define MAXMROOT 9 /* 2^(MAXMROOT-1) = # of elements in BRcnt */

    class FastFourierTran s
    {
    public:
    FastFourierTran s(void);
    ~FastFourierTra ns(void);

    public:

    void FFT2D(vector<ve ctor<CComplex InputArray,
    vector<vector<C Complex OutputArray, long N,long sd);


    };

    throws the following error i do not understand:

    1>e:\daten\dev\ cpp\lightmodula tor2dmat\lightm odulator2d\Fast FourierTrans.h( 34)
    : error C2061: Syntaxfehler: Bezeichner 'vector'
    1>.\FastFourier Trans.cpp(17) : error C2065: 'vector': nichtdeklariert er
    Bezeichner
    1>.\FastFourier Trans.cpp(17) : error C2059: Syntaxfehler: '>'
    1>.\FastFourier Trans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
    vor '{'
    1>.\FastFourier Trans.cpp(21) : error C2447: '{': Funktionskopf fehlt -
    Parameterliste im alten Stil?

    What is wrong ?

    Matthias
  • kingfox

    #2
    Re: why does initialise with vector not work here ?

    On 5ÔÂ10ÈÕ, ÏÂÎç9ʱ38·Ö, Matthias Pospiech <matthia....@gm x.dewrote:
    This class:
    >
    #pragma once
    #include <vector>
    #include "um.h"
    >
    #define MAXMROOT 9 /* 2^(MAXMROOT-1) = # of elements in BRcnt */
    >
    class FastFourierTran s
    {
    public:
    FastFourierTran s(void);
    ~FastFourierTra ns(void);
    >
    public:
    >
    void FFT2D(vector<ve ctor<CComplex InputArray,
    vector<vector<C Complex OutputArray, long N,long sd);
    >
    };
    >
    throws the following error i do not understand:
    >
    1>e:\daten\dev\ cpp\lightmodula tor2dmat\lightm odulator2d\Fast FourierTrans.h(-34)
    : error C2061: Syntaxfehler: Bezeichner 'vector'
    1>.\FastFourier Trans.cpp(17) : error C2065: 'vector': nichtdeklariert er
    Bezeichner
    1>.\FastFourier Trans.cpp(17) : error C2059: Syntaxfehler: '>'
    1>.\FastFourier Trans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
    vor '{'
    1>.\FastFourier Trans.cpp(21) : error C2447: '{': Funktionskopf fehlt -
    Parameterliste im alten Stil?
    >
    What is wrong ?
    >
    Matthias
    It seems that the error message from compiler is not in English. SO,
    could you please translate the error message to English?

    Comment

    • Victor Bazarov

      #3
      Re: why does initialise with vector not work here ?

      Matthias Pospiech wrote:
      This class:
      >
      #pragma once
      #include <vector>
      #include "um.h"
      >
      #define MAXMROOT 9 /* 2^(MAXMROOT-1) = # of elements in BRcnt */
      >
      class FastFourierTran s
      {
      public:
      FastFourierTran s(void);
      ~FastFourierTra ns(void);
      >
      public:
      >
      void FFT2D(vector<ve ctor<CComplex InputArray,
      vector<vector<C Complex OutputArray, long N,long sd);
      Either use 'std::vector' or add 'using std::vector' before this class
      definition. BTW, what book are you reading that doesn't explain 'std'
      namespace and how it's to be used?
      >
      >
      };
      >
      throws the following error i do not understand:
      >
      1>e:\daten\dev\ cpp\lightmodula tor2dmat\lightm odulator2d\Fast FourierTrans.h( 34)
      >error C2061: Syntaxfehler: Bezeichner 'vector'
      1>.\FastFourier Trans.cpp(17) : error C2065: 'vector':
      nichtdeklariert er Bezeichner
      1>.\FastFourier Trans.cpp(17) : error C2059: Syntaxfehler: '>'
      1>.\FastFourier Trans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
      vor '{'
      1>.\FastFourier Trans.cpp(21) : error C2447: '{': Funktionskopf fehlt -
      Parameterliste im alten Stil?
      >
      What is wrong ?
      'vector' is undefined. Next time please translate the error message into
      English -- this is an English speaking newsgroup.

      V
      --
      Please remove capital 'A's when replying by e-mail
      I do not respond to top-posted replies, please don't ask


      Comment

      • faceman28208@yahoo.com

        #4
        Re: why does initialise with vector not work here ?

        On May 10, 9:38 am, Matthias Pospiech <matthia...@gmx .dewrote:
        #include <vector>
        void FFT2D(vector<ve ctor<CComplex InputArray,
        vector<vector<C Complex OutputArray, long N,long sd);
        What is wrong ?
        My German stinks -- but my guess is you need

        std::vector

        Comment

        • *PaN!*

          #5
          Re: why does initialise with vector not work here ?


          "Matthias Pospiech" <matthias79@gmx .dewrote in message
          news:f1v792$nuj $1@newsserver.r rzn.uni-hannover.de...
          void FFT2D(vector<ve ctor<CComplex InputArray,
          vector<vector<C Complex OutputArray, long N,long sd);
          Use std::vector.

          btw, i'm not sure it's a good idea passing two, possibly big,
          vector<vector<X by value. In particular, it's not a brilliant idea if one
          of them is supposed to be modified by the method (and you really want the
          result to reach the caller).
          I'd use a const reference and a simple reference respectively.

          --
          Marco


          Comment

          • Fei Liu

            #6
            Re: why does initialise with vector not work here ?

            Matthias Pospiech wrote:
            This class:
            >
            #pragma once
            #include <vector>
            #include "um.h"
            >
            #define MAXMROOT 9 /* 2^(MAXMROOT-1) = # of elements in BRcnt */
            >
            class FastFourierTran s
            {
            public:
            FastFourierTran s(void);
            ~FastFourierTra ns(void);
            >
            public:
            >
            void FFT2D(vector<ve ctor<CComplex InputArray,
            vector<vector<C Complex OutputArray, long N,long sd);
            >
            >
            };
            >
            throws the following error i do not understand:
            >
            1>e:\daten\dev\ cpp\lightmodula tor2dmat\lightm odulator2d\Fast FourierTrans.h( 34)
            : error C2061: Syntaxfehler: Bezeichner 'vector'
            1>.\FastFourier Trans.cpp(17) : error C2065: 'vector': nichtdeklariert er
            Bezeichner
            1>.\FastFourier Trans.cpp(17) : error C2059: Syntaxfehler: '>'
            1>.\FastFourier Trans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
            vor '{'
            1>.\FastFourier Trans.cpp(21) : error C2447: '{': Funktionskopf fehlt -
            Parameterliste im alten Stil?
            >
            What is wrong ?
            >
            Matthias
            I don't understand your language, but it seems you are missing
            'using namespace std' or you can try 'std::vector' when you use vector
            in your code.

            Fei

            Comment

            • Matthias Pospiech

              #7
              Re: why does initialise with vector not work here ?

              *PaN!* schrieb:
              "Matthias Pospiech" <matthias79@gmx .dewrote in message
              news:f1v792$nuj $1@newsserver.r rzn.uni-hannover.de...
              >
              > void FFT2D(vector<ve ctor<CComplex InputArray,
              >vector<vector< CComplex OutputArray, long N,long sd);
              >
              Use std::vector.
              Yes, of course. I know why I need it, but id did not came to my mind...
              btw, i'm not sure it's a good idea passing two, possibly big,
              vector<vector<X by value. In particular, it's not a brilliant idea if one
              of them is supposed to be modified by the method (and you really want the
              result to reach the caller).
              I'd use a const reference and a simple reference respectively.
              You are absolutely right. I have changed it.

              Matthias

              Comment

              • Ron Natalie

                #8
                Re: why does initialise with vector not work here ?

                Matthias Pospiech wrote:
                This class:
                >
                #pragma once
                #include <vector>
                #include "um.h"
                >
                #define MAXMROOT 9 /* 2^(MAXMROOT-1) = # of elements in BRcnt */
                >
                class FastFourierTran s
                {
                public:
                FastFourierTran s(void);
                ~FastFourierTra ns(void);
                >
                public:
                >
                void FFT2D(vector<ve ctor<CComplex InputArray,
                vector<vector<C Complex OutputArray, long N,long sd);
                >
                std::vector.

                Comment

                Working...