Alright. I'm using a batch file to update the version.h file of the projecy when I run the full build batch on it. However, I've got a problem.
@echo. unsigned long GetVersionDay() { >> version.h
@echo. char Day[15]; >> version.h
@echo. memset(&Day[0],0,15); >> version.h
@echo. memcpy(&Day[0],&VERSION_DATE[4],2); >> version.h
@echo. return atoi(Day); >> version.h
@echo. } >> version.h
@echo. >> version.h
@echo. unsigned long GetVersionMonth() { >> version.h
@echo. char Month[15]; >> version.h
@echo. memset(&Month[0],0,15); >> version.h
@echo. memcpy(&Month[0],&VERSION_DATE[7],2); >> version.h
@echo. return atoi(Month); >> version.h
@echo. } >> version.h
@echo. >> version.h
@echo. unsigned long GetVersionYear() { >> version.h
@echo. char Year[15]; >> version.h
@echo. memset(&Year[0],0,15); >> version.h
@echo. memcpy(&Year[0],&VERSION_DATE[10],4); >> version.h
@echo. return atoi(Year); >> version.h
@echo. } >> version.h
Up until this point everything is working fine, but when I try to echo-append the lines with ampersands "&" in them the code tries to execute what comes after the & instead of just appending the thing into the file. For example, in line 3 it will try to execute "Day[0]" as if it's a command.
I have no idea how to fix this. Does anyone have any ideas?