CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
cout << argc << endl << endl;
for(int i = 0; argv[0][i] != '\0'; i++)
cout << argv[0][i]; //notice how here the output is "..\Playground"
cout << endl << endl;
for(int i = 0; argv[0][i] != '\0'; i++)
cout << argv[0][i] << endl; //but here there's a full path
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run