|
[Sponsors] |
July 27, 2009, 04:51 |
[Solve]programming issue
|
#1 |
Member
Julien Schaguene
Join Date: Apr 2009
Location: France
Posts: 55
Rep Power: 17 |
Hi,
I think it's quite trivial, but I spent time on finding how to get a float as argument for an application. It's a little application dealing with boundary conditions, let's name it JulienFoam I want to be able to use it as: JulienFoam <Boundary> -numericalarg <float> for the moment, I have that: int main(int argc, char *argv[]) { float numericalarg; argList::validArgs.append("patchName"); argList::validOptions.insert("numericalarg",numeri calarg); word patchName(args.args()[1]); [...] } and I don't find how to get my numericalarg as a float, it seems that argList only gets strings. If someone can give me any piece of advice, I think it would be very usefull for my future using, not just for that program. Regards Julien Last edited by Schag; July 27, 2009 at 05:33. |
|
Tags |
programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A book for a beginner wanting to learn programming | frank | Main CFD Forum | 9 | May 12, 2014 23:15 |
OpenFoam programming | prapanj | OpenFOAM | 10 | March 18, 2010 07:23 |
Programming in OpenFOAM | vinu | OpenFOAM | 2 | July 11, 2009 10:16 |
new CFD Programming Forum | Thinker | Main CFD Forum | 14 | November 19, 2002 16:03 |
STAR-CD Dynamics issue 16 | CD adapco Group Marketing | Siemens | 0 | November 30, 2001 10:25 |