Alright, well. C++ is WAY harder to learn/use than VB. By a LONG shot.
That aside, I think I'm making more progress this time through. I figured out how to make a class - and the critterID does return a beautiful "1" to the console.
So, I've decided that I need to read "critterstats.csv" into the program as a 2d array. Now, if anybody knows a good way to search this array (I only need to search the first field of each line), then I can skip the part where I pull the first index of each line into a separate 1-d array, which I can then search for matching strings. Then I can take the index of the matching value and pull the row of data from the 2d array and feed it into the constructor for a new critter.
This seems overly complex. I suppose I could just... enumerate a master list of all critters, such that
"crittername"= [index in csv]
And save a step. I could even pop that out into its own file for easy editing if new critters are added to the list.
Uh. Anybody have any suggestions?
Also: how does one fill an array from a file? a csv?
Alsoalso: i dont think i can, but is it possible to define the array's size by first checking the number of lines in the CSV file, then
const int nBestiarySize = [check #lines in CSV];
a_sBestary[nBestiarySize][nCritterFields];
(where nCritterFields is a hardcoded const)?
If not... well, I'm a little intimidated by memory pointers :|
Also^3: do I need to have
#include <string>
or whatever
in every header? Do i need it in every .cpp? if I have it in a header does it need to be in the .cpp? vice versa? Why does my IDE yell at me when I don't include "stdafx.h" in every .cpp and reciprocal?
Addendum: I think I may be biting off more than I can chew, but, hey, at least I'm learning something. Any help would be appreciated.
Addendum to Addendum: my IDE is now MS Visual Studio Prof. 2010 (dreamspark, despite an AWFUL dl speed, is a pretty good idea)
(I'm sorry if I'm... well, dumb. Teaching yourself is HARD, and I haven't been able to pick up any books. The websites are helpful, but only to a point. I seriously appreciate everyone who's helping me out here, even if it's just "hey, this sounds cool!" You're all getting into the 'special thanks to' section of the credits when this finally gets done. Thanks guys, seriously.)