unresolved external symbol

Hello everyone,

I need to make a program that computes the integral of a normal distribution using the trapezoidal and the simpson method. This is what I've got so far.

http://codepad.org/8k7hzeEI

I know I am only putting the trapezoidal function in my main function, but I first want that one working before I move on to the next, besides I think the error with the simpson function will be the same.
When I debug in visual studio I get this as my output:

1>------ Build started: Project: probeersel2, Configuration: Debug Win32 ------
1>int.obj : error LNK2019: unresolved external symbol "public: __thiscall Integral::Integral(int,int)" (??0Integral@@QAE@HH@Z) referenced in function _main

1>C:\Users\Leentje\Documents\Visual Studio 2010\Projects\probeersel2\Debug\probeersel2.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've searched the web and found several possible solutions, such as change some things in the properties or an error with the constructor, but I can't find what needs to be done in this case.
Yes this is a homework assignment I need to deliver this friday, and I'm not asking for you guys to write the program for me, just how to fix this error.

If you do want to help me, please explain in simple words, because I am very new at this and my English isn't very good.

Thanks in advance.
myIntegral(a,b);

You are calling the constructor Integral::Integral(int, int) here, but you never defined such a constructor.

Inside your class declaration, just put {} after the declaration of the constructor.

BTW: Your Integral class does not have any members. This means right now, it is completely useless to even create an Integral, you might as well make all of your methods static.
Last edited on
Thanks, I've placed the brackets, and now I don't have any errors but the program get's stuck after I've given the values for the variables. It probably has something to do with what your saying about my class and the members, but I still don't understand what's wrong. I've compared it with some examples on the internet and in my book, but I can't find the error.
Last edited on
The problem is your constructor doesn't do anything yet. To be honest, your code is very, very weird. I don't think you do really know what you are doing there.
Topic archived. No new replies allowed.