trahancj
06-16-2009, 09:17 PM
Hello, I am just beginning to program in C++ and have a very simple problem I cannot seem to remedy.
The following simple code (test.cpp):
#include "./nr3.h"
using namespace std;
Int main(void) {
const Int NTOT=20;
Int i,jd,nph=2;
Doub frac,ave,vrnce;
VecDoub data(NTOT);
for (i=0; i<NTOT; i++){
printf("%f",data(i));}
return 0;
}
returns the following error:
:~/Desktop/NurbsQuad/C++$ g++ test.cpp
test.cpp: In function âInt main()â:
test.cpp:10: error: no match for call to â(VecDoub) (Int&)â
at first I thought it was not finding the nr3.h file (which I copies into my working directory), but if I comment out the VecDoub, it compiles just fine (the other nr3.h data types - Int, Doub, etc. do not seem to be a problem.
your help is greatly appreciated,
-Corey
The following simple code (test.cpp):
#include "./nr3.h"
using namespace std;
Int main(void) {
const Int NTOT=20;
Int i,jd,nph=2;
Doub frac,ave,vrnce;
VecDoub data(NTOT);
for (i=0; i<NTOT; i++){
printf("%f",data(i));}
return 0;
}
returns the following error:
:~/Desktop/NurbsQuad/C++$ g++ test.cpp
test.cpp: In function âInt main()â:
test.cpp:10: error: no match for call to â(VecDoub) (Int&)â
at first I thought it was not finding the nr3.h file (which I copies into my working directory), but if I comment out the VecDoub, it compiles just fine (the other nr3.h data types - Int, Doub, etc. do not seem to be a problem.
your help is greatly appreciated,
-Corey