Hi,
I have a hard time reading in a string from a file. I don't get any compile
time or run time errors, but my application does not work reliably when I read
a string from a file. But when I define the same string within my code,
everything runs perfect, allways.
The string I want to use is
On 12/12/2011 03:35 PM, ParticlePeter wrote:
Hi,
I have a hard time reading in a string from a file. I don't get any compile
time or run time errors, but my application does not work reliably when I read
a string from a file. But when I define the same string within my code,
everything runs
Timon Gehr:
string fragString = readText( Shader.vert ) ~ '\0';
I think using toStringz is more self-documenting.
Bye,
bearophile
On 12/12/2011 06:37 PM, bearophile wrote:
Timon Gehr:
string fragString = readText( Shader.vert ) ~ '\0';
I think using toStringz is more self-documenting.
Bye,
bearophile
There is nothing more self-documenting than actually appending the zero.
Claiming toStringz is better in that regard
On Mon, 12 Dec 2011 12:59:11 -0500, Timon Gehr timon.g...@gmx.ch wrote:
On 12/12/2011 06:37 PM, bearophile wrote:
Timon Gehr:
string fragString = readText( Shader.vert ) ~ '\0';
I think using toStringz is more self-documenting.
Bye,
bearophile
There is nothing more self-documenting than
Thank you very much, you made my day, that was it :-)
Cheers, ParticlePeter !
OpenGL probably wants a zero-terminated string. It works if you add the
code as a literal because string literals are zero-terminated.
string fragString = readText( Shader.vert ) ~ '\0';
Alternatively, you can