473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 FastFourierTrans
{
public:
FastFourierTrans(void);
~FastFourierTrans(void);

public:

void FFT2D(vector<vector<CComplex InputArray,
vector<vector<CComplex OutputArray, long N,long sd);
};

throws the following error i do not understand:

1>e:\daten\dev\cpp\lightmodulator2dmat\lightmodula tor2d\FastFourierTrans.h(34)
: error C2061: Syntaxfehler: Bezeichner 'vector'
1>.\FastFourierTrans.cpp(17) : error C2065: 'vector': nichtdeklarierter
Bezeichner
1>.\FastFourierTrans.cpp(17) : error C2059: Syntaxfehler: '>'
1>.\FastFourierTrans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
vor '{'
1>.\FastFourierTrans.cpp(21) : error C2447: '{': Funktionskopf fehlt -
Parameterliste im alten Stil?

What is wrong ?

Matthias
May 10 '07 #1
7 2942
On 5ÔÂ10ÈÕ, ÏÂÎç9ʱ38·Ö, Matthias Pospiech <matthia....@gmx.dewrote:
This class:

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

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

class FastFourierTrans
{
public:
FastFourierTrans(void);
~FastFourierTrans(void);

public:

void FFT2D(vector<vector<CComplex InputArray,
vector<vector<CComplex OutputArray, long N,long sd);

};

throws the following error i do not understand:

1>e:\daten\dev\cpp\lightmodulator2dmat\lightmodula tor2d\FastFourierTrans.h(-34)
: error C2061: Syntaxfehler: Bezeichner 'vector'
1>.\FastFourierTrans.cpp(17) : error C2065: 'vector': nichtdeklarierter
Bezeichner
1>.\FastFourierTrans.cpp(17) : error C2059: Syntaxfehler: '>'
1>.\FastFourierTrans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
vor '{'
1>.\FastFourierTrans.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?

May 10 '07 #2
Matthias Pospiech wrote:
This class:

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

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

class FastFourierTrans
{
public:
FastFourierTrans(void);
~FastFourierTrans(void);

public:

void FFT2D(vector<vector<CComplex InputArray,
vector<vector<CComplex 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\lightmodulator2dmat\lightmodula tor2d\FastFourierTrans.h(34)
>error C2061: Syntaxfehler: Bezeichner 'vector'
1>.\FastFourierTrans.cpp(17) : error C2065: 'vector':
nichtdeklarierter Bezeichner
1>.\FastFourierTrans.cpp(17) : error C2059: Syntaxfehler: '>'
1>.\FastFourierTrans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
vor '{'
1>.\FastFourierTrans.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
May 10 '07 #3
On May 10, 9:38 am, Matthias Pospiech <matthia...@gmx.dewrote:
#include <vector>
void FFT2D(vector<vector<CComplex InputArray,
vector<vector<CComplex OutputArray, long N,long sd);
What is wrong ?
My German stinks -- but my guess is you need

std::vector

May 10 '07 #4

"Matthias Pospiech" <ma********@gmx.dewrote in message
news:f1**********@newsserver.rrzn.uni-hannover.de...
void FFT2D(vector<vector<CComplex InputArray,
vector<vector<CComplex 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
May 10 '07 #5
Matthias Pospiech wrote:
This class:

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

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

class FastFourierTrans
{
public:
FastFourierTrans(void);
~FastFourierTrans(void);

public:

void FFT2D(vector<vector<CComplex InputArray,
vector<vector<CComplex OutputArray, long N,long sd);
};

throws the following error i do not understand:

1>e:\daten\dev\cpp\lightmodulator2dmat\lightmodula tor2d\FastFourierTrans.h(34)
: error C2061: Syntaxfehler: Bezeichner 'vector'
1>.\FastFourierTrans.cpp(17) : error C2065: 'vector': nichtdeklarierter
Bezeichner
1>.\FastFourierTrans.cpp(17) : error C2059: Syntaxfehler: '>'
1>.\FastFourierTrans.cpp(21) : error C2143: Syntaxfehler: Es fehlt ';'
vor '{'
1>.\FastFourierTrans.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
May 10 '07 #6
*PaN!* schrieb:
"Matthias Pospiech" <ma********@gmx.dewrote in message
news:f1**********@newsserver.rrzn.uni-hannover.de...
> void FFT2D(vector<vector<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
May 11 '07 #7
Matthias Pospiech wrote:
This class:

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

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

class FastFourierTrans
{
public:
FastFourierTrans(void);
~FastFourierTrans(void);

public:

void FFT2D(vector<vector<CComplex InputArray,
vector<vector<CComplex OutputArray, long N,long sd);
std::vector.
May 11 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: john smith | last post by:
Hi, when there is a vector<> of pointers to some objects, does calling resize cause vector to call delete on each object, or is there a memory leak problem? for example: struct base {//some...
35
by: Ram Laxman | last post by:
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_type i;
1
by: carl bloc | last post by:
Have this much done but need help with this bit of code: allow user to modify existing draw data. I think I need a counter to give week numbers so the user can select a week number rather than a...
2
by: sam | last post by:
Hi, Can anyone tell me how to initialise list<HashMap> in STL? I written the following function, but if the "key" is not in the hash table, the return value causes: "terminate called after...
9
by: iceColdFire | last post by:
HI, I have a function as void f(int p) { return p++; } now I have created a function pointer as
2
by: mark4asp | last post by:
Why does this not work in Mozilla ? <http://homepage.ntlworld.com/mark.pawelek/code/animals.html> The optHabitat_change() event does not fire. What am I doing wrong here? PS: It should...
2
by: Tomás | last post by:
Up until lately I've been writing all mad kinds of code for accomplishing things, but lately I've decided to lean more toward the whole readability, etc. side of things. I have a command line...
6
by: zl2k | last post by:
hi, there I am using a big, sparse binary array (size of 256^3). The size may be changed in run time. I first thought about using the bitset but found its size is unchangeable. If I use the...
17
by: christophe.chazeau | last post by:
Hi, I have a problem with a really simple chunk of code which should work but does obviously does not. This chunk of code is just a POC aimed at finding a bug in a larger project in which the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.