This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: New at c++
- From: John Love-Jensen <eljay at adobe dot com>
- To: Lopezio <geral at mariolopes dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 10 Jun 2008 13:59:27 -0500
- Subject: Re: New at c++
Hi Lopezio,
> I program in Pascal with parameters and my programs run like
> nameofprogram.exe param1 param2
> How can i do the same in c++?
Your question is off-topic for this forum. This is a GCC specific help
forum, and your question is a general C++ question. I'm not pointing this
out to chastise you. I'm pointing it out because there are more suitable
forums for general C++ questions, with which you may be able to get answers
to your general C++ questions faster and/or more accurately.
That being said...
#include <iostream>
int main(int argc, char** argv)
{
for(int i = 1; i < argc; ++i)
{
std::cout << "Parameter " << i << ": "
<< argv[i] << std::endl;
}
}
HTH,
--Eljay