Functions of type vector<double>

Hi,
I am working on a project in college using Visual C++ 2010
and I would like help with an error...
error C3861: 'dataV': identifier not found.
It seems as though it isn't 'seeing' the 'dataV' function? Any help is
appreciated. Warm regards, Vicky

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <vector>
#include <iostream>
#include <sstream>

using namespace std;

int main(){
	
	vector<double> test1;
	test1 = dataV();
//vector<double> test1 = dataV();
	return 0;
}

vector<double> dataV(){
	
	vector<double> any ;
// do stuff here

	return any;
}
C++ compilers don't do look-ahead. All identifiers must be declared before use (although you can define them later).

Basically, to fix this just add this line:

vector<double> dataV();

before your main function.
Topic archived. No new replies allowed.