Welcome Guest, Not a member yet? Register   Sign In
fopen question
#1

[eluser]Sub-Zero[/eluser]
Hi!

The following line of code is giving me a parsing error:

fopen("C:\\sample\file\".SAMPLE_FILE, "r"); // example code

//This is how I'm defining SAMPLE_FILE: define("SAMPLE_FILE", "sample.txt");

Any suggestions?
#2

[eluser]Dam1an[/eluser]
You need to escape the backslashes (or use forward slashes) as the last one is escaping the closing "
#3

[eluser]Sub-Zero[/eluser]
Thanks for the info!




Theme © iAndrew 2016 - Forum software by © MyBB