std::getline

R

Rolf Magnus

sam said:
Hi,

How can I use getline ignore the commandline arguments?

Your question makes no sense. getline doesn't have to do anything with
command line arguments. And if you want to ignore the command line
arguments, just don't do anything with them.
 
M

Mike Wahler

sam said:
Hi,

How can I use getline ignore the commandline arguments?

No special action is needed in order to ignore
command-line arguments. Simply ignore them.
You can have your 'main()' function refuse
to 'admit' that any exist, by not declaring
any:

int main()

Or if you do declare them:

int main(int argc, char **argv)

You can still 'ignore' them by not referring to
them (however in this case some compilers might
issue a warning).

-Mike
 
R

Rapscallion

Rolf said:
Your question makes no sense. getline doesn't have to do anything with
command line arguments. And if you want to ignore the command line
arguments, just don't do anything with them.

Maybe she confuses getline and getopt.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,667
Latest member
DaniloB294

Latest Threads

Top