program crashes after external call
A windows exe calls another exe using console argumens.
To fetch those arguments I decided to make my own exe which fetches the arguments and runs the second program after.
So I replaced the second exe with my own program.
Unfortunately my program crashes immediately after the call.
I can't find my mistake since manual calles work.

    #include <Windows.h>
    #include <iostream>
    
    int main(int argc, char *argv[]) {
    	for(int i=0;i<argc;i++)
    		std::cout << argv[i] << std::endl;
    	system("PAUSE");

    	return 0;
    }
program crashes after external call
===

A windows exe calls another exe using console argumens.
To fetch those arguments I decided to make my own exe which fetches the arguments and runs the second program after.
So I replaced the second exe with my own program.
Unfortunately my program crashes immediately after the call.
I can't find my mistake since manual calles work.

    #include <Windows.h>
    #include <iostream>
    
    int main(int argc, char *argv[]) {
    	for(int i=0;i<argc;i++)
    		std::cout << argv[i] << std::endl;
    	system("PAUSE");

    	return 0;
    }