Anyone doing or have done the Stanford CS106B course, or maybe just can give me help with C++? It's not really a programming issue, it's just a mundane C++ issue that make me understand quite well why python is so beloved. I'm trying to load up the first program introduced in class, and it's giving me errors.
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
Here's the code:
And here's the error:
first_program.obj : error LNK2019: unresolved external symbol "int __cdecl GetInteger(void)" (?GetInteger@@YAHXZ) referenced in function "double __cdecl GetScoresAndAverage(int)" (?GetScoresAndAverage@@YANH@Z)
I think it's related to the external libraries I call at the beginning of the code, but these should - theoretically - be OK, as I downloaded what I believe are the correct libraries from the Stanford site. Everything is identical to that introduced in lecture 2 of 106B except that I added the line using namespace std; to the beginning, because without that cout wasn't recognized :\
Not the answer you are looking for? Search for more explanations.
Those libraries, i dont think are necessary for this program, also GetInteger hasnt been defined.
I figured it was something like that, but the example ran in class just fine. I assume GetInteger is, or should be, contained in one of those header files, but it isn't... I'm guessing? Why would that be the case? Does anyone know where I can find the correct header files?
You have to ask your teacher
Hmm... but all of the course content should be online; it seems silly to put 30 lectures, homework assignments, tests, etc online and not include basic libraries :\
OK so looking further in the auxiliary files that I am using, namely simpio.h, I can see a "definition" here, but it's really no definition at all, unless that comment counts :\ are they expecting me to write it? I mean, I could do that... but :\
What have other people who have taken CS106 done? Anyone here?
Oh, here's the code in simpio
OK, for this one I just wrote it myself :\ oh well, it works. Hopefully I can either find the right libraries soon, or the other stuff is just as easy to write.
If you downloaded the "All the files".zip, it should have an installer for both OSX and Micro$oft's C++ IDE. Look for PCLibs-VS2005-ADT-Installer.zip. Then select Stanford when you create projects.
I use the OSX version of the class.
There has been many times where I forgot to include my lib in a command switch. What compiler are you using and is your dev enviroment set up correctly to point to your libs?
I was able to solve it by installing VS 2005 and then using the provided installer. I wish they had chosen a less restrictive way to use the libraries, but oh well. :\
The course is from 2008, so 2005 isn't that far out. I don't know the Microsoft install, but judging by the Mac, it's just a matter of placing things in the right place.