   ascii model loader
  I posted something on the OpenGL forum asking for directions to a tutorial on writing a model loader for ascii files (sadly, nobody''s responded yet and it''s dropping to the bottom of the page). Could someone, then, tell me the pseudocode or what I need to implement to get one working? I can figure out the syntax on my own, I just need some direction. Thanx in advance.P.S. I''ve noticed on NeHe''s lesson 31 source code that every header has a cpp file counterpart without a WinMain or anything similar. Could someone please explain this to me? 
  1) What''s an ASCII model loader?.. well usually, you put (a)/(group of) related class(es) interface in one header, and (its)/(their) implementation in a .cpp and include the header in the CPP.  Its a fairly standard practice.Only one main is needed, which is often in main.cpp or something similar.Makes it easier to find a specific function/method you are looking for. ;  Thanks for clearing up that bit about the multiple .cpp files! I thought these were actually different programs, not mean to be written as one big one. Still can''t get it to load, so I figure I''ll just write my own based on that one, which brings me to another question (last one for this topic, I promise). Since everything in a header is technically global anyway, does it matter if I use classes or structures? I like using Blah.Whatever much better than stuff like :: or -> or ~ and I figure it will make implementing animation later easier. Will this work, or will I run into memory problems and all that? ;  I suggest you read a good book on C++, you seem to have some things mixed up.  There is a difference between a class definition and a class instance.class Foo{int bar;char moo;};This is in the header.  This isn''t ''public per see, because it isn''t an instance, it is just a definition.when you doFoo FooGlobalInstance; int main(){  Foo FooInstanceOnlyInMain;}(most likely in the cpp)FooGlobalInstance is an instance and it is global to the cpp file... (if you put in in a header, its global to every file which include it)FooInstanceOnlyInMain isn''t global and is only usable in main.Think of classes as data types, like int or char, but defined by the user.so in... int iNumber;  iNumber would be an instance of int. ;  I understand what you''re saying about scope. My problem was my program wouldn''t run the cModel::LoadModel() member function in the OpenGL drawing function. It said something about me not being able to call it outside the class, even though it was a public function. I just figured structures would be easier to work with. ;  You need to read up on C++.You declare a class member like this://in myclass.hClass MyClass{private://blah blah blahpublic:  void MyMemberFunction(); //here's the declaration};   You define the class member like this://in myclass.cpp#include "myclass.h"void MyClass::MyMemberFunction(){//blah blah blah}   And you call a class member like this://in main.cpp#include "myclass.h"void SomeFunction(){  MyClass anObject; //creating an instance of MyClass  anObject.MyMemberFunction(); //the function call}  I really mean it about getting a good C++ book. If you don't know this much C++, don't move on to graphics and stuff with it yet. There is a way of getting member functions to be able to be called without instantiating the class, using the :: operator, but that isn't used very often.   [edited by - SoulSkorpion on August 3, 2003 9:15:26 AM]