Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Console app, where are the args?
Console app, where are the args? [message #48126] Mon, 22 May 2017 02:25 Go to next message
ptkacz is currently offline  ptkacz
Messages: 89
Registered: March 2017
Member
Hi Guys,

A console app looks something like:
#include <Core/Core.h>
#include <iostream>

using namespace Upp;
using namespace std;

CONSOLE_APP_MAIN
{
	cout << "HELLO" << endl;
}

What's the magic code to extract command line arguments?


Peter
Re: Console app, where are the args? [message #48139 is a reply to message #48126] Thu, 25 May 2017 11:49 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Dear ptkacz

You can use CommandLine()

CONSOLE_APP_MAIN
{
    const Vector<String>& cmdline = CommandLine();
    for(int i = 0; i < cmdline.GetCount(); i++) {
    ...


Best regards
IƱaki
Re: Console app, where are the args? [message #48164 is a reply to message #48126] Tue, 30 May 2017 05:10 Go to previous message
ptkacz is currently offline  ptkacz
Messages: 89
Registered: March 2017
Member
Thanks Koldo.
Previous Topic: link error
Next Topic: I can't use mruby in Ultimate++
Goto Forum:
  


Current Time: Fri Mar 29 16:32:45 CET 2024

Total time taken to generate the page: 0.01897 seconds