Problem: Cannot put environmental variables into a neat list on output:
Tried solutions: Thought an array list might work, however i am struggling to understand how i would go about it.
The working Code:
This displays the environmental variables. How would i list them neatly.
An array? or another way?
Please help.
Tried solutions: Thought an array list might work, however i am struggling to understand how i would go about it.
The working Code:
#include <iostream>
int main(int,char **,char ** envp) {
for(int i=0;envp[i]!=NULL;i++)
std::cout << envp[i];
system ("pause"); return 0;
}
This displays the environmental variables. How would i list them neatly.
An array? or another way?
Please help.