Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionchar *> string conversion , env[] Pin
ALLERSLIT26-Oct-10 7:12
ALLERSLIT26-Oct-10 7:12 
QuestionRe: char *> string conversion , env[] Pin
David Crow26-Oct-10 7:22
David Crow26-Oct-10 7:22 
AnswerRe: char *> string conversion , env[] Pin
ALLERSLIT26-Oct-10 7:38
ALLERSLIT26-Oct-10 7:38 
AnswerRe: char *> string conversion , env[] Pin
David Crow26-Oct-10 7:46
David Crow26-Oct-10 7:46 
GeneralRe: char *> string conversion , env[] Pin
ALLERSLIT26-Oct-10 7:50
ALLERSLIT26-Oct-10 7:50 
QuestionRe: char *> string conversion , env[] Pin
David Crow26-Oct-10 7:53
David Crow26-Oct-10 7:53 
AnswerRe: char *> string conversion , env[] Pin
ALLERSLIT26-Oct-10 8:16
ALLERSLIT26-Oct-10 8:16 
QuestionRe: char *> string conversion , env[] Pin
David Crow26-Oct-10 8:20
David Crow26-Oct-10 8:20 
Whether you declare them in the signature or not, the number of command-line arguments, the command-line arguments themselves, and the environment variables are "sent" to main() regardless. Obviously, if you opt to not declare them in main()'s signature, you will not have access to them.

That said, what is env and how is it declared?

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Man who follows car will be exhausted." - Confucius


GeneralRe: char *> string conversion , env[] Pin
CPallini26-Oct-10 9:28
mveCPallini26-Oct-10 9:28 
GeneralRe: char *> string conversion , env[] Pin
CPallini26-Oct-10 7:50
mveCPallini26-Oct-10 7:50 
GeneralRe: char *> string conversion , env[] Pin
Richard MacCutchan26-Oct-10 10:28
mveRichard MacCutchan26-Oct-10 10:28 
QuestionHow to unregister a windows service? Pin
Aseem Sharma26-Oct-10 6:48
Aseem Sharma26-Oct-10 6:48 
QuestionCross referencing resource ID between source code and resource file ? Pin
Maximilien26-Oct-10 4:15
Maximilien26-Oct-10 4:15 
AnswerRe: Cross referencing resource ID between source code and resource file ? Pin
David Crow26-Oct-10 4:27
David Crow26-Oct-10 4:27 
AnswerRe: Cross referencing resource ID between source code and resource file ? Pin
Sauro Viti26-Oct-10 4:45
professionalSauro Viti26-Oct-10 4:45 
QuestionC++ parser Pin
Andrea Di Domenico26-Oct-10 3:44
Andrea Di Domenico26-Oct-10 3:44 
AnswerRe: C++ parser Pin
Cedric Moonen26-Oct-10 4:45
Cedric Moonen26-Oct-10 4:45 
GeneralRe: C++ parser Pin
Andrea Di Domenico26-Oct-10 5:27
Andrea Di Domenico26-Oct-10 5:27 
GeneralRe: C++ parser Pin
Cedric Moonen26-Oct-10 7:25
Cedric Moonen26-Oct-10 7:25 
AnswerRe: C++ parser Pin
CPallini26-Oct-10 5:58
mveCPallini26-Oct-10 5:58 
AnswerRe: C++ parser [modified] Pin
Rick York26-Oct-10 8:14
mveRick York26-Oct-10 8:14 
JokeRe: C++ parser Pin
Alain Rist26-Oct-10 10:48
Alain Rist26-Oct-10 10:48 
GeneralRe: C++ parser Pin
Rick York27-Oct-10 10:37
mveRick York27-Oct-10 10:37 
GeneralRe: C++ parser Pin
Alain Rist27-Oct-10 10:59
Alain Rist27-Oct-10 10:59 
GeneralRe: C++ parser Pin
Andrea Di Domenico2-Nov-10 3:47
Andrea Di Domenico2-Nov-10 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.