THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/05/2008 at 17:23, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.5
Platform:
Language(s) : C++ ;
---------
Hi :)
I have a question. I create a textfile with a texteditor and import it via the BaseFile function. The same on Win doesn't work and I get crypted chars.
> `
\> //Reads a file and returns a string
\> //*---------------------------------------------------------------------------*
\> String GetFileContent(Filename fn)
\> //*---------------------------------------------------------------------------*
\> {
\> String line = String("");
\>
\> AutoAlloc<BaseFile> bFile;
\> bFile->Open(fn, GE_READ, FILE_IGNOREOPEN, GE_MOTOROLA, MACTYPE_CINEMA, MACCREATOR_CINEMA);
\>
\> String token, singleChar;
\> LONG fileLength = bFile->GetLength();
\>
\> CHAR c;
\> CHAR* pc = &c;
\>
\> for (LONG i = 0; i != fileLength; i++)
\> {
\> bFile->ReadChar(pc);
\> singleChar = pc;
\>
\> if (pc == "\n"){
\> line += "\n";
\> }
\> else {
\> line += pc;
\> }
\> }
\> bFile->Close();
\>
\> return line;
\> }`
Could someone give me a tip how to do it on win too?
Thanks and bye :)