Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102843449
ex1.cc
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
Mon, Feb 24, 18:32
Size
665 B
Mime Type
text/x-c
Expires
Wed, Feb 26, 18:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24439536
Attached To
R7571 SP4E-TB-TL-FR
ex1.cc
View Options
#include <cstdlib>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
/* -------------------------------------------------------------------------- */
int
main
(
int
argc
,
char
**
argv
){
std
::
string
myName
=
"TNErocks"
;
if
(
argc
>
1
)
{
std
::
string
argument
=
std
::
string
(
argv
[
1
]);
if
(
argument
==
myName
){
std
::
cout
<<
"You are a rockstar"
<<
std
::
endl
;
}
else
{
std
::
cout
<<
"You are a NOT rockstar"
<<
std
::
endl
;
}
}
else
{
std
::
cout
<<
"You are nothing"
<<
std
::
endl
;
}
return
EXIT_SUCCESS
;
}
Event Timeline
Log In to Comment