Hi, so I am trying to create a program where I can give it arguments from a batch file, which contains an x and y coordinates that will change the console cursor to that position. I can take that argument look at it, but I can use it well as it is stored in an array and I can't use an array to set the console cursor. Viewing the code in Visual Studio 2019, it doesn't seem to have any errors, but when running the code using 'Local Windows Debugger', there is some sort of exception on line 15, but not 14 (the code is below). It must be a problem with how I am trying to convert the parts of the array to integers. If anyone could help that would be greatly appreciated. Also if you need me to explain anything or expand on anything, please let me know.
At risk of sounding like a broken record - this is why you should always put braces around a block of code that's part of a loop, or a conditional statement, even when that block is a single line long.
Because when you come to add a second line to that block, there will be times when you forget to add the braces you need. Much better to put them in right from the beginning.