Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78992415
arguments.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 24, 04:19
Size
591 B
Mime Type
text/x-c
Expires
Mon, Aug 26, 04:19 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
20132487
Attached To
R9360 PCSC_git
arguments.cpp
View Options
#include <iostream>
int
main
(
int
argc
,
char
*
argv
[])
{
std
::
cout
<<
"Number of command line arguments = "
;
std
::
cout
<<
argc
<<
"
\n
"
;
for
(
int
i
=
0
;
i
<
argc
;
i
++
)
{
std
::
cout
<<
"Argument "
<<
i
<<
" = "
<<
argv
[
i
];
std
::
cout
<<
"
\n
"
;
}
std
::
string
program_name
=
argv
[
0
];
int
number_of_nodes
=
std
::
stoi
(
argv
[
1
]);
double
conductivity
=
std
::
stof
(
argv
[
2
]);
std
::
cout
<<
"Program name = "
<<
program_name
<<
"
\n
"
;
std
::
cout
<<
"Number of nodes = "
<<
number_of_nodes
;
std
::
cout
<<
"
\n
"
;
std
::
cout
<<
"Conductivity = "
<<
conductivity
<<
"
\n
"
;
return
0
;
}
Event Timeline
Log In to Comment