473,396 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Can one of you C guru's help me please???

Hello,

I am a new to this board and came here out of desparation....

I need to modifiy a C program to allow the workareas (there could be up to 30) it uses to be defined externally and passed to the C program, also I need to pass the lengths of the work areas.

I have exhausted my limited knowledge of C is there any of you folks that can provide some assistance.

I will tell you right now, i am one of those old dinosaurs that still writes programs in machine language and I guess C is just to modern for me to understand.

Thanks for any help provided.
Jul 11 '06 #1
2 1678
Banfa
9,065 Expert Mod 8TB
ok the entry point of a C program is

Expand|Select|Wrap|Line Numbers
  1. int main( int argc, char **argp )
  2. {
  3.    /* Program code here */
  4. }
  5.  
argc gives the number of command line arguments and argp is an array of pointers to these arguments, note that the prgram name is always in the first one of these.

By processing the data in argc and argp you can pass data into a program at run time, so you can pass the sizes of your workareas on the command line, i.e.

MyProgram 1024 1024 2048 4096

This in main will result with

argc=5
argp[0]="MyProgram"
argp[1]="1024"
argp[2]="1024"
argp[3]="2048"
argp[4]="4096"

you can use strtoul to convert the strings to there binary values.
Jul 12 '06 #2
Banfa,

Thanks.. thats a good start.
Jul 12 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Gabriel | last post by:
Hello everyone. If you were to code a secure membership system in PHP using MySQL with the follwing features: * a signup function where the user gets an email with a random password *...
11
by: Mike Cox | last post by:
After writing an article trashing java, and C++, notable LISP guru Paul Graham is getting roasted on slashdot. Apart from AutoCAD and Emacs, what has LISP done anyway? Most real work is done in...
2
by: rmn | last post by:
Hi, I'm looking for the translation betwen the color spaces, but I must be mistaken with the methods to use, losing the values. Please, I need a little help of a "coloured guru"....
4
by: Accolo1 | last post by:
Help we are looking for this person, do you know them? William wjohnson@accolo.com Title: BEA WebLogic Portal Guru Job #: 03-04468 Check the pulse of your career! Evolve our eCommerce web...
3
by: Richard | last post by:
Trying to wrap my brain around Regex for the first time... I need to be able to replace Sql @NamedParameters with "?" for compliance with an extremely lame 3rd party Odbc driver. I know that...
2
by: LJ | last post by:
Hi there security guru! I have a simple question that boggles my mind. I have written a VB6 application that creates a file on a fileserver. Obviously, the user has sufficient security rights to...
0
by: Curt | last post by:
If you are a guru in VB 2005 and have worked with Crystal Reports. I need to hire you to help me. Please email me at CurtTampa at my gmail account. I am ONLY Interested if you are in the Tampa FL...
3
by: Michael Suess | last post by:
Hi, please feel free to correct me if this is the wrong group to ask this question. I have a blog about parallel programming and concurrency (http://www.thinkingparallel.com if you are...
16
by: Singulus | last post by:
Hello all, I've searched for similar threads, I've found some bit of useful info here and there, but nevertheless I want to post my questions...So, how can I (we, in fact the forum can benefit...
1
by: stevenjs | last post by:
Greeings, all, Flash 8 has quiz templates which are coded for multiple choice, true/false, text statement, and matching types of questions, along with hotspots and probably anoher type I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.