This is probably a really silly question but I haven't been able to find an answer... But Visual C++ will not let me do the following code (I get a run-time error):
How can I can I change one character in a string? MSDN says the above code is illegal (even though I know I've done it in other compilers!) but I can't figure out what to do instead. I've also tried initializing filename using strncpy so it will no longer be constant...Code:// In header file char *filename; // In constructor filename = "frame0000.tif"; // Later in another method ++filename[8]; // This is where I get the error
Thanks for your help!



LinkBack URL
About LinkBacks


