I have written a small program that will be run on Win NT4 and W2k from a batch file.
I am using _findfirst to get the file attributes and I then open the file using fopen(name, a+) to read the number of records and I then append this info as a new record at the end of the file. (all works ok)
I want to be able to run the program from within the batch script using something like
I will copy the path+filename into a variable (say char *test) from argv.
I then need to escape(replace) the '\' characters in the string with '\\' so _findfirst and fopen will work correctly.
ie. I need test to contain c:\\dir1\\dir2\\dirtest\\filename.txt
I hope ive explained this clear enough as its been a while since ive been writing c.
int main(int argc, char* argv)
*test = argv; //test now contains c:\dir1\dir2\dirtest\filename.txt
//need to parse test so it contains c:\\dir1\\dir2\\dirtest\\filename.txt
>>I then need to escape(replace) the '\' characters in the string with '\\' so _findfirst and fopen will work correctly.
No, you don't :o)
If you write
With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net. To view more iPhone tutorials, visit www.sdkexpert.net.
This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…