• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.