   "translating" this into c++?
sprintf(tempString,"%s/%s",fontdir,"font.ini");fp = fopen(tempString, "rb");if( fp == NULL ){  return 0;}fscanf(fp, "%d", &width);fclose(fp);how would you "translate" this to c++? if there anyway, or is sprintf and fscanf used in c++ to? :S im lost... 
  Well, for the ''sprintf()'' function, I think for C++ it''s ''strcat()''. Not for sure that it''s C++ instead of C though. For the file I/O portion, use  ("#include <fstream>"). ;  but does the %s work in c++ as well? ;  strcat() is a C function.. it appends strings...All of that code will work with C++.. many people still use C functions in C++ (I use fopen for the must part...) There is a reference of C++ functions at www.cplusplus.com   [edited by - curtmax_0 on February 17, 2004 8:49:19 AM];{  std::string path(fontdir);  path.append("font.ini"); // assumes fontdir ends in /  std::ifstream ifile(path);  int word;  ifile >> word;};  Why not :{  std::string path(fontdir);  std::string tempString = path + "/" + "font.ini";  std::ifstream ifile(tempString);  int word;  ifile >> word;} ;  i''m pretty sure you can drop the tempstring and just do ''path += "font.ini"'' instead ;  Heh, looks like your converting the Cone3D Font engine.   R.I.P. Mark OsbackSolo Pa Mi GenteVG-ForceEkim Gram Productions;  First of all, that *is* valid C++ as it is part of the standard library.  There are new ways to do these things in C++, which I think is what you meant.Toward that end, read about std::fstream and std::stringstream.   --Dave Mikesell Software